antony@notes:~/suse$ cat "SCA-in-SUSE-Linux-Enterprise-Server-15.md"
SCA in SUSE Linux Enterprise Server 15
SCA in SUSE Linux Enterprise Server 15
[TOC]
Question 1
In the scripts subdirectory under your home directory there is a file named tstparse.sh. You want to set an Extended ACL so the jsmith user has all permissions to just this file. Which command will accomplish this?
A. setacl -a user:jsmith:rwx ~/scripts/tstparse.sh B. extacl -a user=jsmith:rwx ~/scripts/tstparse.sh C. modacl user=jsmith:rwx ~/scripts/tstparse.sh D. setfacl -m u:jsmith:rwx ~/scripts/tstparse.sh
Answer: d
解析
setfacl 全名是 “set file access control lists”
修改檔案的 ACL 權限,可以使用 setfacl 搭配 -m 或 --modify 參數,並指定 ACL 權限。例如授予 myuser 使用者讀取與執行(rx)權限:
# 授予 myuser 使用者 rx 權限
setfacl -m u:myuser:rx myfile.txt:::spoiler 詳細語法
:::
對應的講義頁數 : 235 頁