How can I set full permissions to a user in a specified dir in linux?
|
feedback
|
|
Depends what you mean 'full permissions'. If you want a user to have full read and write access to all files and directories in that directory, then this will help:
The first command makes the user own the directory.
The second command gives them full read and access permissions. The | |||||||||
feedback
|
|
You can give the user ownership with the following command: Permissions are controlled with | |||
|
feedback
|
|
The two solutions previous to my comment assume that you only want a SINGLE person to have full access to a directory and its sub-directories and files below it. Is that correct or do you want MULTIPLE people to have full access to that specific directory? | |||
|
feedback
|
|
If you do not wish to change the existing permissions of the directory, yet would like to give a user (or multiple users or groups) permissions to the contents of the directory, you can use ACLs. Some filesystems (ext3) require the acl flag on mount to enable ACLs. Often, just using groups is sufficient, but ACLs can be more flexible. Look at the setfacl and getfacl commands for more information. | |||
|
feedback
|