Solved

how do i grant a user permission to create folders

Posted on 2010-08-18
7
731 Views
Last Modified: 2013-12-06
i need to grant a user higher level of filesystem permissions.  I want to give him root permissions.  i have the admin account.
0
Comment
Question by:globalterminal
7 Comments
 
LVL 3

Expert Comment

by:adallen
ID: 33465039
0
 

Author Comment

by:globalterminal
ID: 33465083
got an example?
and sudo will be effective the change whenever the user logs in?
0
 
LVL 3

Accepted Solution

by:
adallen earned 300 total points
ID: 33465121
Follow the man page:

man sudo

you will need to add the user to the sudousers file under /etc/ by using visudo

All the answers are in the man page

example:

user types:

sudo chmod 774 /home/user/bla

or you can give the user full root permissions:

sudo /bin/bash
0
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 76

Expert Comment

by:arnold
ID: 33465208
Instead of user rights elevation that susdo provides, you might be better off using setfacl if there is a specific location where you want the user to have these rights.


setfacl is equivalent to chmod but allows the admin to configure multiple levels of access to the same folder.
i.e.
group1 has read-only access /resourcefolder
group2 has read-write access /resourcefolder
these can only be seen using getfacl /resourcefolder

setfacl -m g:group1:rx /resourcefolder
setfacl -m g:group2:rwx /resourcefolder

for user you would use u:username:rights

ls / | grep resourcefolder
will have a + at the end of drwxr-xr-x+ to indicate that there is an ACL.
0
 

Author Comment

by:globalterminal
ID: 33465393
the user needs permissions to create subdirectories inside the the /opt dir.

how would i do that?
0
 
LVL 9

Assisted Solution

by:jeremycrussell
jeremycrussell earned 200 total points
ID: 33465901
A few options.

1. Add the user to the owning group of /opt and change permission of /opt to allow it group writeable "chmod g+rwx /opt"

2. Just open /opt to be writable by the world (not recommended) "chmod ago+rwx /opt"

3. Create an acl to allow that single user access to write to /opt. "setfacl -m u:<user>:rwx /opt", replacing <user> with the proper uid.
0
 

Author Comment

by:globalterminal
ID: 33465938
i used chmod 777 opt
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now