How to setup ACLs on solaris?
-
Here is an example to setup acls on a directory so a user can write to it, even though the original directory is owned by root and is rwx only by root, that's where ACLs come in.
Make your directory
# mkdir conf
This is how it looks before ACLs have been applied.
# ls -ld conf drwxr-xr-x 2 root root 512 Aug 16 13:36 conf # getfacl conf # file: conf # owner: root # group: root user::rwx group::r-x #effective:r-x mask:r-x other:r-x
Setup the basic ACL for the driectory
# setfacl -m user::rwx,group::---,mask:rwx,other:---, \ default:user::rwx,default:group::---,default:mask:rwx,default:other:--- conf
It puts a plus at the end of the directory.
# ls -ld conf drwx------+ 2 root root 512 Aug 16 13:36 conf
This is how the ACLs on the directory look after basic acls have been applied.
# getfacl conf # file: conf # owner: root # group: root user::rwx group::---
© Lightnetics 2024