GNU Linux/Permissions/POSIX ACLs
Requirements for using ACLs
- Supported by the filesystem used to store content
- The filesystem is mounted with the
- The appropriate package containing the command-line
getfacltools is installed
- the package is named
- the package is named
- Current version of file utils (
mv, etc) with support for working with ACLs
Confirm filesystem is mounted with proper support -
You can use
tune2fs -l /dev/X | grep acl (where X is the device).
sudo tune2fs -l /dev/sdaX | grep acl
Default mount options: user_xattr acl
If it's not there, it would need to be added as a mount option for any filesystem that supports ACLs.
Confirm Kernel has support built-in 
Here we're looking in the @/boot/config-2.6.32-73-server@ kernel config file on an Ubuntu 10.04 LTS server to verify that the kernel was built with ACL support for the filesystem(s) that we're using. In our case we're only using Ext4, but as you can see below this kernel includes support for the other filesystems listed in the conf as well.
$ grep _ACL /boot/config-$(uname -r)
CONFIG_EXT2_FS_POSIX_ACL=y CONFIG_EXT3_FS_POSIX_ACL=y CONFIG_EXT4_FS_POSIX_ACL=y CONFIG_REISERFS_FS_POSIX_ACL=y CONFIG_JFS_POSIX_ACL=y CONFIG_FS_POSIX_ACL=y CONFIG_XFS_POSIX_ACL=y CONFIG_OCFS2_FS_POSIX_ACL=y CONFIG_BTRFS_FS_POSIX_ACL=y CONFIG_GENERIC_ACL=y CONFIG_TMPFS_POSIX_ACL=y CONFIG_NFS_V3_ACL=y CONFIG_NFSD_V2_ACL=y CONFIG_NFSD_V3_ACL=y CONFIG_NFS_ACL_SUPPORT=m
setfacl -d -m group:rwx /path/to/your/dir
It appears to be setting the
Default ACL for the
owning group to rwx (octal 777) for a specific directory. Presumably this means that inheritance would push those settings down to any newly created files/directories.
- Q: What about existing files?
- Q: What about existing directories?
mask entry further limits the permissions granted by
named group, and
owning group entries by defining which of the permissions in those entries are
effective and which are masked. 
- If permissions exist in one of the mentioned entries as well as the mask, they are effective.
- Permissions contained only in the mask or only in the actual entry are not effective--meaning the permissions are not granted.
- All permissions defined in the
owning groupentries are always effective.
Removing POSIX ACLs
To remove all the permissions for a user, groups, or others, use the following command :
setfacl -x ACL entry type file
For example, to remove all permissions from the user antony:
setfacl -x u:antony /mnt/gluster/data/test-file