How to give a normal user access only to the /var/log directory Centos7
I am thinking two ways:
-
Using
setfacl
:setfacl -m user:username:rwx /var/log setfacl -m mask:rwx /var/log
-
Then using the
sudoers
file:User_Alias OP koko OP ALL=(root) NOPASSWD: /var/log
Note:
Use sudo visudo
when editing the sudoers file