SINT - filesystem ACLs quick fix after chmod intervention

If you see this # effective:rw- thing, you propably ran chmod over ACLs enabled filesystem.
 $ getfacl ./testfile
 # file: testfile
 # owner: root
 # group: root
 user::rw-
 group::rwx                      #effective:rw-
 group:web-admin:rwx             #effective:rw-
 mask::rw-
 other::r--
 
 # set ACLs recursively for all files and directories within working directory (only for example purpose - read note bellow code section)
 $ sudo setfacl -R -m g::rw- -m g:web-admin:rw- * ## reset executable bit, modify ACLs only for default group and web-admin group
 $ sudo setfacl -R -m g::rwX -m g:web-admin:rwX * ## set ACLs for default group and group web-admin with executable bit enabled for directories only
 
 $ getfacl ./testfile
 # file: testfile
 # owner: root
 # group: root
 user::rw-
 group::rw-
 group:web-admin:rw-
 mask::rw-
 other::r--
 

Note: I set ACLs for whole directory recursively (all files, and directories matched by * wildcard). You can set ACLs per file, or directory
by replacing * for filename, or dirname and without -R option.

author: niekto@niekde.sk (Jaroslav Petráš)

date: Tue, 04 Dec 2012 12:34:11 +0000

link: CyberAsylum.eu/sint-filesystem-acls-quick-fix-after-chmod-intervention