Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

let's say we have dir1 with mode 755 root root and I want user1 to be able to write to the directory, but I don't want to add him to the root group or change the user or group ownership of the directory. Is there something along the lines of chmod user1+w for only granting additional access to a single user without disturbing ownership or adding the user to another group? ACLs perhaps?

CentOS 6.4 EXT4

share|improve this question
    
When I used a Mac, chmod allowed you to add an ACL to a file using chmod +a 'john deny write' file1 or something like that. Does the FreeBSD chmod allow ACLs and the GNU version not allow it? –  user160910 Apr 19 '13 at 21:38

2 Answers 2

up vote 1 down vote accepted

If you have acl support installed (package acl) and mounted the FS with acl support (option acl in /etc/fstab), you can try the following:

setfacl -m "u:user1:rwx" /path/to/dir1/

This should add user1 to the list of users allowed to write to that directory.

More infos with man setfacl and man getfacl.

share|improve this answer

Yes the answer is ACL. We currently config ACL on a thousand of user web server

share|improve this answer
    
Maybe you could elaborate your answer with an example? Just a thought. –  slm Apr 20 '13 at 0:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.