Is there a way in linux to make "acl" part of the default mount options, so that it does not need to be specified individually for each filesystem in fstab?

  • I don't think you can edit or add anything to the default as it may break your mount and it might not even boot in. What you are doing is the fine approch to it, adding a new comma for your ACL at each filesystem.
    – Prix
    Aug 7 '10 at 18:39
  • As far as I know ACLs are enabled by default on modern Linux distros and at least ext3 and XFS. I've tested Ubuntu 10.04 server and Debian 5.0.4.
    – Jasper
    Aug 7 '10 at 18:54
  • I've looked through the source for mount.c and I can't see where the defaults is defined - the only reference to it is static const struct opt_map opt_map[] = { { "defaults", 0, 0, 0 }, /* default options */ but I can't see where it chooses the default. I'm interested to know the answer to this one, upvoting.
    – James L
    Aug 7 '10 at 19:57
  • If you want mount to automaticly mount with acl why don't you make a simple bash in replace of mount that will automaticly put the acl on the filesystem for you.
    – Prix
    Aug 7 '10 at 21:16
  • @James: the default mount options depend on the filesystem type; for example acl is only defined for a few of the filesystems that Linux supports (e.g. ext2 and reiserfs but not proc or vfat). Aug 8 '10 at 11:23

If you just want to clean up /etc/fstab, then you should be able to change the FS metadata to put acls into the default mount options on a per-FS basis. Not really buying you much, as it moves the important data out of sight and so will be forgotten when it comes time to rebuild, unless you have a strong documentation culture.

  • Yeah, that's why I was hoping for a config file somewhere instead. Aug 9 '10 at 4:58

I don't believe there's any facility in mount or /etc/fstab to set defaults. You will need to specify acl for each filesystem. Why is this a problem?

  • Not a huge problem, but I was just wondering if there was a config file that would let me say "I want ACLs for the whole system." Aug 7 '10 at 21:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.