How to enable ACL?

3

I've installed ACL on my Ubuntu:

aptitude install acl

What is the next step ? /etc/fstab ?

  # /etc/fstab: static file system information.
    #
    # Use 'blkid -o value -s UUID' to print the universally unique identifier
    # for a device; this may be used with UUID= as a more robust way to name
    # devices that works even if disks are added and removed. See fstab(5).
    #
    # <file system> <mount point>   <type>  <options>       <dump>  <pass>
    proc            /proc           proc    nodev,noexec,nosuid 0       0
    # / was on /dev/sda1 during installation
    UUID=54dd976c-b95d-4f44-b4f7-516107dbed85 /               ext4    errors=remount-ro 0       1
    # swap was on /dev/sda2 during installation
    UUID=b03c5549-9b4a-444f-a1ff-6c1e3c767836 none            swap    sw              0       0
    /dev/fd0        /media/floppy0  auto    rw,user,noauto,exec,utf8 0       0

Thank you

Damiano

Posted 2011-04-26T09:53:51.720

Reputation: 41

Answers

5

ext4 ACL are not enabled by default (at least on a debian squeeze). So, your way is to add the acl option in your /etc/fstab

…
UUID=54dd976c-b95d-4f44-b4f7-516107dbed85 /               ext4    errors=remount-ro,acl ,0       1
…

… and to avoid a reboot, you can apply it immediatly :

# mount -oremount /

(can't believe it's not enabled by default…)

Jocelyn delalande

Posted 2011-04-26T09:53:51.720

Reputation: 163

And do not forget that you should have root access. – Josef Klimuk – 2018-04-09T04:34:26.240

0

getfacl(1)

setfacl(1)

Some filesystems may need acl added to their mount options, but I believe most use it by default.

Ignacio Vazquez-Abrams

Posted 2011-04-26T09:53:51.720

Reputation: 100 516

@Ignacio Vazquez-Abrams i have edited my question, please take a look at the fstab. Do I have to change something ? thank you – Damiano – 2011-04-26T10:12:29.673

Some filesystems may need acl added to their mount options, but I believe most use it by default. – Ignacio Vazquez-Abrams – 2011-04-26T10:14:49.380

@Ignacio Vazquez-Abrams ok perfect! last question... if I set permission to /home/test... also all the directory inside this will have the same permissions, right? – Damiano – 2011-04-26T10:19:41.417

ACLs take effect per filesystem object, and setfacl is not recursive by default. – Ignacio Vazquez-Abrams – 2011-04-26T10:20:37.460

OMG, if i have 300 directories inside i have to write 300 time setfacl? :-( – Damiano – 2011-04-26T10:28:02.720

Or you could just use find... – Ignacio Vazquez-Abrams – 2011-04-26T10:28:58.173

@Ignacio Vazquez-Abrams If in this directory an ftp server upload files and directories, I would like to extend ACL permissions also to these future files/directories, how could i do? – Damiano – 2011-04-26T10:31:39.970

You'd have to use a tool that watches for filesystem changes and applies the ACLs. – Ignacio Vazquez-Abrams – 2011-04-26T10:32:55.643

@Ignacio Vazquez-Abrams any advice? – Damiano – 2011-04-26T10:37:27.920