7

IIRC then the mount options shown in /proc/mounts have changed. Some time ago acl and user_xattr were shown, now it seems that only noacl and nouser_xattr are shown if these features are turned off.

Where is this configured? Does that depend on the compiled-in defaults of the filesystem code? How can I check whether a volume supports e.g. ACL? Is there a better solution than testing with setfacl, getfacl?

2
  • Yes, checking closer, same problem using 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 not root etc. So ... deleted answer.
    – Runium
    Jun 19, 2013 at 13:37
  • @don_crissti Wow, what an extreme investigation. What makes this a comment in contrast to an answer? Jun 19, 2013 at 14:32

2 Answers 2

4

Upstream decided to enable acl and user_xattr by default and remove them as mount options (noacl / nouser_xattr are still valid mount options hence they are shown).

1
  • 1
    Is there a way to show all flags, in whatever state they're in?
    – Marcin
    Jun 19, 2013 at 19:18
3

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.

4
  • Support of POSIX draft type ACLs in zfsonlinux (other ZFS implementations only support NFSv4 ACLs which Linux doesn't support yet (except with patches as on Suse)), is recent and AFAIK has not been officially released yet. Jun 9, 2014 at 12:43
  • Is there a way to discover this information without using tune2fs? man tune2fs also shows that it only works with ext2,3,4 file systems? If I need to test other network mount shares like CIFS/SMB from a Windows server, what approach will do that?
    – user658182
    Nov 4, 2022 at 11:45
  • Also, is there such a table of filesystem types, versions, and commands to check defaults vs kernel versions? I come across needing to have this info quite often, and quite often don't have root while investigating legacy systems.
    – user658182
    Nov 4, 2022 at 11:54
  • @user658182 There's no generic way other than trying setfacl or the underlying acl_xxx functions. With a network mount, ACL only work if both the network protocol and the underlying filesystem on the server support the ACL. Nov 4, 2022 at 12:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .