FreeBSD ACL

From MyWiki

Jump to: navigation, search

To set ACL on a directory (directory called test in the example below), you have to set the default ACL (-d flag) for the directory, then ACL for the directory.

IMPORTANT: default ACL does not affect the directory itself, only the files that will be created under the directory! The sequence of the commands is important! First - default ACL, then ACL for the directory itself.

setfacl -dm u::rwx,g::rx:o::-,m::rwx test
setfacl -m u:amarkelo:rwx,g::rx,m::rwx test

then we can setup ACL on a file in the directory:

setfacl -m u:amarkelo:rw,g::r,m::rw test/test_file1

Good articles:

http://www.onlamp.com/lpt/a/6185

http://ezine.daemonnews.org/200310/acl.html

Personal tools