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

  • 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

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.

| improve this answer | |

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy