equal
deleted
inserted
replaced
35 $ sudo getfacl ~/tmp/dir >~/tmp/backup.acl |
35 $ sudo getfacl ~/tmp/dir >~/tmp/backup.acl |
36 $ sudo setfacl --restore=~/tmp/backup.acl |
36 $ sudo setfacl --restore=~/tmp/backup.acl |
37 |
37 |
38 Add default ACL to directory to make ACL permission inheritance:: |
38 Add default ACL to directory to make ACL permission inheritance:: |
39 |
39 |
40 $ sudo setfacl -m -d u:nobody:rwx /srv/www |
40 $ sudo setfacl -d -m u:nobody:rwx /srv/www |
41 $ sudo setfacl -m u:nobody:rwx /srv/www |
41 $ sudo setfacl -m u:nobody:rwx /srv/www |
42 |
42 |
43 or by single command:: |
43 or by single command:: |
44 |
44 |
45 $ sudo setfacl -m u:nobody:rwx,d:u:nobody:rwx /srv/www |
45 $ sudo setfacl -m u:nobody:rwx,d:u:nobody:rwx /srv/www |
46 |
46 |
47 To apply permission recursively add ``-R`` option:: |
47 To apply permission recursively add ``-R`` option:: |
48 |
48 |
49 $ sudo setfacl -R -m -d u:nobody:rwx /srv/www |
49 $ sudo setfacl -R -d -m u:nobody:rwx /srv/www |
50 $ sudo setfacl -R -m u:nobody:rwx /srv/www |
50 $ sudo setfacl -R -m u:nobody:rwx /srv/www |
51 |
51 |
52 .. NOTE:: default ACL is set only on directories and is applied only to |
52 .. NOTE:: default ACL is set only on directories and is applied only to |
53 directory children. So you should explicitly add permission to |
53 directory children. So you should explicitly add permission to |
54 directory itself! |
54 directory itself! |