如何启用 ACL?

如何启用 ACL?

我已经在我的 Ubuntu 上安装了 ACL:

aptitude install acl

下一步是什么?/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

谢谢

答案1

ext4 ACL 默认不启用(至少在 debian squeeze 上)。因此,您的方法是添加访问控制列表选项/etc/fstab


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

…为了避免重新启动,您可以立即应用它:

# mount -oremount /

(不敢相信它默认没有启用……)

答案2

getfacl(1)

setfacl(1)

某些文件系统可能需要acl添加到其挂载选项中,但我相信大多数都默认使用它。

相关内容