FreeBSD ACL

From MyWiki

(Difference between revisions)
Jump to: navigation, search
Admin (Talk | contribs)
(Created page with 'To set ACL on a directory (directory called <tt>test</tt> in the example below), you have to set the default ACL (-d flag) for the directory, then ACL for the directory. '''IMP…')
Newer edit →

Revision as of 20:20, 3 November 2009

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