getfacl

パーミッション

書き方

getfacl [path]

所有者、グループ、その他とは別に付いた権限一覧を表示します。acl パッケージを入れた Linux のもので、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 パッケージを入れた Linux のもので、macOS は ls -le で独自の ACL を見せます。

Q. どう打ちますか。

getfacl [path] — 角括弧は省いてよい部分です。

Q. よく使うオプションはいくつですか。

ここにまとめたのは5個です。全部は man getfacl にあります。このコマンドはパーミッションの仲間です。

関連するコマンド

man ページ: man getfacl