Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 746
  • Last Modified:

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.
0
globalterminal
Asked:
globalterminal
2 Solutions
 
adallenCommented:
0
 
globalterminalAuthor Commented:
got an example?
and sudo will be effective the change whenever the user logs in?
0
 
adallenCommented:
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

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

how would i do that?
0
 
jeremycrussellCommented:
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
 
globalterminalAuthor Commented:
i used chmod 777 opt
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now