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?
Asked
Active
Viewed 2,734 times
3
-
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 07 '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 07 '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 07 '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 07 '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`). – Gilles 'SO- stop being evil' Aug 08 '10 at 11:23
2 Answers
1
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?

Dennis Williamson
- 62,149
- 16
- 116
- 151
-
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." – Ryan C. Thompson Aug 07 '10 at 21:45
1
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.

Phil P
- 3,080
- 1
- 16
- 19
-
Yeah, that's why I was hoping for a config file somewhere instead. – Ryan C. Thompson Aug 09 '10 at 04:58