見出し画像

Appendix getfacl,setfacl コマンド

パッケージ情報

[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# rpm -qf `which getfacl`
acl-2.3.1-3.el9.x86_64
[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# rpm -qf `which setfacl`
acl-2.3.1-3.el9.x86_64
[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# dnf info acl
インストール済みパッケージ
名前         : acl
バージョン   : 2.3.1
リリース     : 3.el9
Arch         : x86_64
サイズ       : 209 k
ソース       : acl-2.3.1-3.el9.src.rpm
リポジトリー : @System
repo から    : BaseOS
概要         : Access control list utilities
URL          : https://savannah.nongnu.org/projects/acl
ライセンス   : GPLv2+
説明         : This package contains the getfacl and setfacl utilities needed for
             : manipulating access control lists.

[root@rocky9-samba31 ~]#

getfaclコマンド

[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# getfacl --help
getfacl 2.3.1 -- get file access control lists
Usage: getfacl [-aceEsRLPtpndvh] file ...
  -a, --access            display the file access control list only
  -d, --default           display the default access control list only
  -c, --omit-header       do not display the comment header
  -e, --all-effective     print all effective rights
  -E, --no-effective      print no effective rights
  -s, --skip-base         skip files that only have the base entries
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P, --physical          physical walk, do not follow symbolic links
  -t, --tabular           use tabular output format
  -n, --numeric           print numeric user/group identifiers
      --one-file-system   skip files on different filesystems
  -p, --absolute-names    don't strip leading '/' in pathnames
  -v, --version           print version and exit
  -h, --help              this help text
[root@rocky9-samba31 ~]#

setfaclコマンド

[root@rocky9-samba31 ~]#
[root@rocky9-samba31 ~]# setfacl --help
setfacl 2.3.1 -- set file access control lists
Usage: setfacl [-bkndRLP] { -m|-M|-x|-X ... } file ...
  -m, --modify=acl        modify the current ACL(s) of file(s)
  -M, --modify-file=file  read ACL entries to modify from file
  -x, --remove=acl        remove entries from the ACL(s) of file(s)
  -X, --remove-file=file  read ACL entries to remove from file
  -b, --remove-all        remove all extended ACL entries
  -k, --remove-default    remove the default ACL
      --set=acl           set the ACL of file(s), replacing the current ACL
      --set-file=file     read ACL entries to set from file
      --mask              do recalculate the effective rights mask
  -n, --no-mask           don't recalculate the effective rights mask
  -d, --default           operations apply to the default ACL
  -R, --recursive         recurse into subdirectories
  -L, --logical           logical walk, follow symbolic links
  -P, --physical          physical walk, do not follow symbolic links
      --restore=file      restore ACLs (inverse of `getfacl -R')
      --test              test mode (ACLs are not modified)
  -v, --version           print version and exit
  -h, --help              this help text
[root@rocky9-samba31 ~]#


この記事が気に入ったらサポートをしてみませんか?