1

I have this command:

chmod -R +a 'group:test1 allow  list,search,readattr,readextattr,readsecurity,file_inherit,directory_inherit' /PATH

Which works fine. Question is, how do I add another group in the same command?

This does not work:

chmod -R +a 'group:test1,group:test2 allow list,search,readattr,readextattr,readsecurity,file_inherit,directory_inherit' /PATH
0

You can't. chmod +a adds one entry to the ACL, and each ACL entry refers to one user or group. From the man page:

Each file has one ACL, containing an ordered list of entries. Each entry refers to a user or group, and grants or denies a set of permissions.

So you'll need something like

for g in test1 test2; do
    chmod -R +a "group:$g allow ... " /path/to/directory
done
0

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .