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


Look into access control lists and the command setfacl

| improve this answer | |

I am thinking two ways:

  1. Using setfacl:

    setfacl -m user:username:rwx /var/log
    setfacl -m mask:rwx /var/log
  2. Then using the sudoers file:

    User_Alias     OP koko
    OP ALL=(root) NOPASSWD: /var/log


Use sudo visudo when editing the sudoers file

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.