ACL이 활성화되지 않았지만 작동 중입니다.

ACL이 활성화되지 않았지만 작동 중입니다.

어떻게 이럴 수있어?

  1. ACL이 활성화되어 있지 않습니다 /etc/fstab. fstab수동으로 열거나 실행하여 확인할 수 있습니다 sudo mount | grep -i acl.

  2. 그러나 getfacl& setfacl명령은 불만 없이 작동합니다!

문제는 먼저 이것이 작동하는 이유를 이해해야 하고, 두 번째로 다른 시스템이 ACL을 지원하는지 확인해야 하는데 어떻게 해야 합니까?

ACL 명령 /은 &에서 테스트되었습니다 /mydrive( mount아래 출력 참조).

운영 체제 정보:

uname -a:
Linux localhost 3.2.0-4-amd64 #1 SMP Debian 3.2.57-3+deb7u1 x86_64 GNU/Linux

lsb_release -a:
No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 7.5 (wheezy) Release: 7.5 Codename: wheezy

mount:
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime) proc on /proc type proc (rw,nosuid,nodev,noexec,relatime) udev on /dev type devtmpfs (rw,relatime,size=10240k,nr_inodes=384309,mode=755) devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000) tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=308664k,mode=755) /dev/disk/by-uuid/3180f94a-e765-44e9-93f7-33aa1c6422c0 on / type ext4 (rw,relatime,errors=remount-ro,user_xattr,barrier=1,data=ordered) tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k) tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=1188500k) /dev/sda5 on /mydrive type ext4 (rw,relatime,user_xattr,barrier=1,data=ordered) rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime) binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime) fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)

답변1

확대3/4파일 시스템에는기본 설치 옵션헤더의 속성입니다. 다음을 통해 볼 수 있습니다:

$ LC_ALL=C tune2fs -l /dev/device | grep 'Default mount options:'
Default mount options:    user_xattr acl

를 사용하여 변경할 수 있으며 , tune2fs -o설치 시 -o noacl덮어쓰게 됩니다 .

새 파일 시스템을 생성하면 mke2fs에서 지정한 내용에 따라 설정됩니다 /etc/mke2fs.conf. 예를 들어 내 것에는 다음이 있습니다.

[defaults]
[...]
        default_mntopts = acl,user_xattr
[...]

그러나 다음과 같이자일스는 지적했다., 2.6.39부터 기본적으로 acl활성화됩니다 user_xattr(제공된 지원은 일반적으로 기본값인 컴파일 타임에 커널에서 활성화됩니다). 따라서 acl기본 마운트 옵션이 없더라도 acl최신 커널에서는 s가 기본적으로 활성화되어 있으며 이를 비활성화하는 유일한 방법은 를 사용하는 것입니다 mount -o noacl.

ACL이 지원되는지 확인하려면 ACL을 쿼리해 보는 것이 가장 좋습니다.

$ chacl -l /the/mountpoint
chacl: cannot get access ACL on '/the/mountpoint': Operation not supported

관련 정보