Blog Linux Unix

recursive setacl command on linux/unix

Setting access control list(acl) recursively is not as straigthforward in HP/UX. I believe the same is true for other Unix flavors. In case you are wondering how, the command is shown below.


find /any/path -exec setacl -m user:USERID:rwx {} ';'

What it does is it finds all the files and directories inside the /any/path, recursively. And then on each of the files/directories, it executes the the setacl command.

For some linux flavors, this is done simpler as below.

setacl -Rm user:USERID:rwx

Here's how to install setacl/setfacl -->Install setacl