Some filesystem types support ACLs with no mount option, others only with a mount option. For ext2/ext3/ext4, some default mount options including acl/noacl are stored in the filesystem (you can see this in tune2fs -l /dev/BLOCK_DEVICE | grep '^Default mount options:'
). As noted by don_crissti, for ext4, whether the option is shown or not depends on the kernel version (since kernel 2.6.39, acl
defaults on no matter what the filesystem says). Filesystems such as vfat and minix have no ACL support. Filesystems such as tmpfs, xfs and zfs always support ACLs.
Unless you want to build and maintain a big table of filesystem types, versions, commands to check defaults, and kernel versions, there is no way to determine whether a filesystem supports ACLs via mount options or filesystem characteristics. You can't tell by pure observation with getfacl
either as it will always at least report unix permissions. Even if a filesystem supports ACLs, it may not support the ACL types that you want. So your best bet is to call setfacl
(or the underlying C APIs) to try to set the ACL you want. If the error status is EOPNOTSUPP (Operation not supported), you'll know that the filesystem doesn't support (this type of) ACLs.
tune2fs -l /dev/sdxN
. It shows if using/dev/disk/by-uuid/XXX
instead of/dev/sdxN
for some./dev/sdxN
for others.root
aka/
shows in/proc/mounts
– but not others. Manual mounts shows in/etc/mtab
but notroot
etc. So ... deleted answer. – Runium Jun 19 '13 at 13:37