how do i grant a user permission to create folders

i need to grant a user higher level of filesystem permissions.  I want to give him root permissions.  i have the admin account.
Who is Participating?
adallenConnect With a Mentor Commented:
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


user types:

sudo chmod 774 /home/user/bla

or you can give the user full root permissions:

sudo /bin/bash
globalterminalAuthor Commented:
got an example?
and sudo will be effective the change whenever the user logs in?
A proven path to a career in data science

At Springboard, we know how to get you a job in data science. With Springboard’s Data Science Career Track, you’ll master data science  with a curriculum built by industry experts. You’ll work on real projects, and get 1-on-1 mentorship from a data scientist.

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.
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.
globalterminalAuthor Commented:
the user needs permissions to create subdirectories inside the the /opt dir.

how would i do that?
jeremycrussellConnect With a Mentor Commented:
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.
globalterminalAuthor Commented:
i used chmod 777 opt
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.