LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   ACLs / "acl" option when mounting filesystems (https://www.linuxquestions.org/questions/linux-security-4/acls-acl-option-when-mounting-filesystems-4175421155/)

phatrik 08-09-2012 01:36 AM

ACLs / "acl" option when mounting filesystems
 
I'm wondering what's the point of mounting a filesystem with the ACL option? Here's a scenario I tested out:


The file system on which this test is being carried on is NOT mounted with the ACL option.

I changed the file's permissions so everyone could read it:

Code:

chmod 744 testfile
I confirmed testuser could read the file. I logged in on a different console as testuser and read the file contents with "cat"


Switched to the previous console, applied an ACL so that testuser couldn't read said file:

Code:

setfacl -m user:testuser:---
Switched to the other console where testuser was logged in and confirmed he couldn't read the file anymore



All of this to say, the fs wasn't mounted with the "ACL" option and yet, it seems like they still apply. I looked at the manpage for mount and it reads "Support POSIX Access Control Lists (or not)". So what's the point?

EricTRA 08-09-2012 02:29 AM

Hi,

If I'm not mistaking it depends on the file system you're using, which you didn't mention. Several file systems come with ACL enabled by default (for example ext4), so there's no need to specify acl as mount option. If you use a distinct file system type (nfs, reiserfs, ...) then you might need to specify however. Check what file system you're using and if it has ACL enabled by default.

Kind regards,

Eric

phatrik 08-09-2012 02:55 AM

The filesystem is indeed EXT4. That explains it, thanks.


Quote:

Originally Posted by EricTRA (Post 4749645)
Hi,

If I'm not mistaking it depends on the file system you're using, which you didn't mention. Several file systems come with ACL enabled by default (for example ext4), so there's no need to specify acl as mount option. If you use a distinct file system type (nfs, reiserfs, ...) then you might need to specify however. Check what file system you're using and if it has ACL enabled by default.

Kind regards,

Eric


EricTRA 08-09-2012 02:57 AM

Hi,

You're welcome. Thanks for marking the thread solved.

Kind regards,

Eric


All times are GMT -5. The time now is 09:44 AM.