
我使用以下命令創建了sudo
用戶:hrsupport
hrsupport ALL=ALL, NOPASSWD: /bin/chown, /bin/chmod, /bin/chgrp, /scripts/pkgacct, /scripts/restorepkg
我怎樣才能實現這個目標
- 應該
hrsupport
能夠在其他目錄上建立和刪除文件,例如/home/someone
- 無法
hrsupport
做到,這是cd
作為一個群體home/someone/public_html
nobody
- 使用者
hrsupport
應該只能執行上述指令+任何使用者常用的其他指令。
答案1
經過很長一段時間,我終於找到了答案。
問題:==> hrsupport 無法 cd 到 home/someone/public_html,目錄中沒有人作為一個群組
解決方案:==>我將hrsupport用戶加入到nobody群組中
問題解決了。