アクセス制御リストの設定は適用されません。

アクセス制御リストの設定は適用されません。

特定のファイルのACLを設定しようとしていますが、オプションを使用しています。

  • Rは再帰を意味します。
  • dはデフォルトです。
  • m は修正に使用されます。

以下のように何の効果もないようです。

/home/pkaramol/Desktop/somedir
$ getfacl afile 
# file: afile
# owner: pkaramol
# group: pkaramol
user::rw-
group::rw-
other::---  


/home/pkaramol/Desktop/somedir
$ sudo setfacl -Rdm u:bullwinkle:rwx afile 


/home/pkaramol/Desktop/somedir
$ getfacl afile 
# file: afile
# owner: pkaramol
# group: pkaramol
user::rw-
group::rw-
other::---

ベストアンサー1

-Rdrealを使用することは、ディレクトリを扱うときにのみ意味があります。特定のファイルのACLを変更して他のユーザーを追加するには、次のようにします。

$ sudo setfacl -m u:user1:rwx somefile
$ getfacl somefile
# file: somefile
# owner: root
# group: root
user::rw-
user:user1:rwx
group::r--
mask::rwx
other::r--
man setfaclページあたり:
-R, --recursive
       Apply operations to all files and directories recursively. This 
       option cannot be mixed with `--restore'.

-d, --default
       All operations apply to the Default ACL. Regular ACL entries in the 
       input set are promoted to Default ACL entries. Default ACL entries in 
       the input set  are  discarded.  (A  warning  is issued if that 
       happens).

おすすめ記事