Setting setfacl

Latest response

Looking for guidance on setting setfacl

I need to setfacl on a directory so that any file that is created within that directory (including sub-directories) gets rw permissions for the secondary group "coggroup".

Ex:
directory name : targetdir
permissions on targetdir: drwxrws---. 11 root coggroup
umask: 0022

I need to have any file created in targetdir/ to automatically gain permission rw for for coggroup, including sub-folders

Any help would be appreciated.

Thanks.

Responses

The setfacl command here should be what you're needing. It'd be "setfacl -d -m group:name:rw /path/to/dir" but change name to your group and add a "-R" if you want it recursive.

Thanks a bunch, that did the trick. What does the additional + on permissions listings mean? Is it just an indication that there are ACL's being applied? Ex. drwx--Sr-x+

That is correct, the + at the end shows that there are acls applied and the capital S shows that the group bit is applied while the group execute permission was not set. A lower case s is when the underlying permission bit is there and the group bit is set.

I guess I spoke too soon. Sub-directories created under the root are also being changed to group rw rather than rwx.

Ah I mistyped my above command, add an x to the rw for full 777 permissions