问题原文
原帖链接 · anish · CC BY-SA 3.0
I have a non-admin user in Centos7 to whom I need to give permissions only to access /var/log as he needs to write it's own log file mainly supervised.log i'm starting supervisord as non root user
I do not want to give him admin access at any cost.
How can I achieve this
已采纳解答
原帖链接 · George Udosen · CC BY-SA 4.0
I am thinking two ways:
Using
setfacl:setfacl -m user:username:rwx /var/log setfacl -m mask:rwx /var/logThen using the
sudoersfile:User_Alias OP = koko OP ALL=(root) NOPASSWD: /var/log
Note:
Use sudo visudo when editing the sudoers file
摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。
