
내 파일 시스템에 '/etc/file.conf'라는 파일이 있습니다.
$ getfacl /etc/file.conf
getfacl: Removing leading '/' from absolute path names
# file: etc/file.conf
# owner: root
# group: root
user::rw-
group::r--
other::r--
내 Python 스크립트가 쓸 수 있도록 내 계정 'userr'에 쓰기 권한이 있기를 원합니다. 루트가 소유하므로 내 아이디어는 새 그룹을 만들고 이를 그룹에 설정하는 것이었습니다.
$ sudo groupadd rsnap
$ sudo usermod -a -G rsnap userr
$ id userr
uid=1000(userr) gid=1000(userr) groups=1000(user),27(sudo),1001(rsnap)
$ sudo setfacl -m g:rsnap:rw /etc/file.conf
$ getfacl /etc/file.conf
getfacl: Removing leading '/' from absolute path names
# file: etc/file.conf
# owner: root
# group: root
user::rw-
group::r--
group:rsnap:rw-
mask::rw-
other::r--
하지만..
$ echo "Test" >> /etc/file.conf
-bash: /etc/file.conf: Permission denied
내가 무엇을 놓쳤나요?
답변1
수정 /etc/rsnapshot.conf
했지만 /etc/file.conf
.
다음을 통해 마스크를 활성화해야 합니다.
setfacl -m m:rw- filename
또는
setfacl -m m::rw- filename
OS에 따라 다르지만 이러한 종류의 ACL은 표준화된 적이 없습니다. 1993년의 관련 표준 제안은 1997년에 철회되었습니다.
참고: 귀하의 마스크가 이미 설정되어 있을 수도 있다는 점을 방금 확인했습니다. 그래서 여전히 잘못된 파일 이름을 사용했습니다.
이 오래된 ACL 제안의 문제는 표준 제안이 완료되지 않았고 그것이 고객이 원하는 것이 아니라는 합의가 있었기 때문에 자주 발생합니다.