·터미널 명령어

getfacl

권한·소유

쓰는 꼴

getfacl [path]

소유자, 그룹, 기타 말고 따로 붙은 접근 권한 목록을 찍습니다. acl 꾸러미를 넣은 리눅스의 것이고, macOS는 ls -le로 자기 방식의 ACL을 보여 줍니다.

자주 쓰는 옵션

옵션
-RWalk a whole tree
-dShow the default ACL that new files will inherit
-aShow only the ACL of the file itself
--omit-headerLeave out the three comment lines
-ePrint the effective rights after the mask is applied

예시

getfacl report.pdf

The ACL plus the ordinary owner and group bits.

getfacl dir | setfacl --set-file=- other_dir

Copies one ACL onto another directory.

ls -le report.pdf

How macOS shows its own kind of ACL instead.

숫자 모드와 문자 모드가 같은 것을 가리킵니다. 755와 u=rwx,go=rx는 같은 뜻입니다.

읽는 방법

  • 대괄호 [ ]는 넣어도 되고 안 넣어도 되는 자리입니다.
  • 점 셋 …은 여러 개를 이어 쓸 수 있다는 뜻입니다.
  • 옵션은 대소문자를 가립니다 — -r과 -R이 다른 명령도 있습니다.

자주 묻는 것

Q. getfacl은 무엇을 하나요?

소유자, 그룹, 기타 말고 따로 붙은 접근 권한 목록을 찍습니다. acl 꾸러미를 넣은 리눅스의 것이고, macOS는 ls -le로 자기 방식의 ACL을 보여 줍니다.

Q. 어떻게 치나요?

getfacl [path] — 대괄호는 생략할 수 있는 자리입니다.

Q. 옵션은 몇 개나 자주 쓰나요?

여기 정리한 것은 5개입니다. 전체 목록은 man getfacl에 있습니다. 이 명령은 권한·소유 갈래입니다.

같이 보는 명령

man 페이지: man getfacl