ACL(Access Control List)
: chmod 명령어보다 더 다양한 권한을 부여할 수 있다.
user, group, other 권한을 건드리지 않고 특정 사용자에게 권한을 부여할 수 있다.
setfacl(Set File Access Control Lists)
: 파일 및 디렉터리의 ACL 정보를 설정한다.
setfacl —modify(-m) user:test:rwx test01
: test 사용자에게 test01 파일에 읽기, 쓰기, 실행 권한을 부여한다.
setfacl -x user:test test01
: test01 파일에 부여한 test 사용자 acl 권한을 제거한다.
setfacl -b test01
: test01 파일의 모든 acl 권한을 제거한다.
getfacl(Get File Access Control Lists)
: 파일 또는 디렉터리의 ACL 정보를 확인한다.
ACL 권한 부여
ls -al
-rw-r--r--. 1 root root 0 Nov 9 14:10 test01
# test 사용자에게 test01 파일 권한 부여
setfacl --modify user:test:rwx test01
getfacl test01
# file: test01
# owner: root
# group: root
user::rw-
user:test:rwx
group::r--
mask::rwx
other::r--
su - test
echo "Hello World!" > test01
cat test01
Hello World!
ACL 권한 제거
setfacl -x user:test test01
getfacl test01
# file: test01
# owner: root
# group: root
user::rw-
group::r--
mask::r--
other::r--
'시리즈 > Linux 기초 다지기 2023 (개편 예정) - 시리즈' 카테고리의 다른 글
리눅스 기초 다지기 - 49. 패스워드 정책 설정 (4) | 2025.03.14 |
---|---|
리눅스 기초 다지기 - 47. SetUID, SetGID, Sticky Bit 특수권한 (0) | 2025.03.14 |
리눅스 기초 다지기 - 46. chown, chgrp 파일 소유권 설정 (0) | 2025.03.14 |
리눅스 기초 다지기 - 45. chmod 파일 권한 변경 (0) | 2025.03.14 |
리눅스 기초 다지기 - 44. umask 기본 권한 설정 (0) | 2025.03.14 |