LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   When ACL is actual without fstab (https://www.linuxquestions.org/questions/linux-software-2/when-acl-is-actual-without-fstab-4175455618/)

sluge 03-26-2013 02:49 AM

When ACL is actual without fstab
 
Hello!

On my linux I created additional logical volume "data", add corresponding line to fstab like

Code:

/dev/mapper/VGdata-LVdata /data                ext4    defaults        1 2
But after it I can't set ACL attributes to it using setfacl:

Code:

# setfacl -m d:u::rwx /data/
setfacl: /data/: Operation not supported

I know that it's requered to add acl parameter to mount options.


But in my fstab I have additional mount points:
Code:

/dev/mapper/VGhome-LVhome /home                  ext4    defaults        1 2
/dev/mapper/VGopt-LVopt /opt                    ext4    defaults        1 2
/dev/mapper/VGvar-LVvar /var                    ext4    defaults        1 2

and it works without any acl parameter! Why?

Also I installed linux to additional PC and created /data during installation, and it cat use setfacl without acl parameter in fstab! Why additional mount points requeres acl in fstab?

jschiwal 03-26-2013 04:56 AM

They all should require the acl mount option. Add it. The only explanation I can think of is that you tried a setfacl command that was equivalent to a chmod command because only the three permissions u, g, o were affected. I don't believe any distro uses a mount command that includes acl as a default option.

rknichols 03-26-2013 10:27 AM

The super block also has a field for default mount options, which can be set when the filesystem is built or by tune2fs. If "acl" is set there, it will be applied unless specifically overridden at mount time.
Code:

# tune2fs -l /dev/sda6 | grep options
Default mount options:    user_xattr acl
# tune2fs -l /dev/sda5 | grep options
Default mount options:    (none)


chrism01 03-27-2013 11:43 PM

You don't mention your distro, but there is a note in the RHEL5 docs saying that during Installation, disks (partitions) defined at that time will ALSO have acl turned on; see tune2fs as above.
Manually added/created partitions must have acls enabled manually, either

1. amend fstab
OR
2. add to xattrs eg
Code:

tune2fs /dev/sda5 -o acl


All times are GMT -5. The time now is 05:57 PM.