0

how can I assign read only permission to all users who are entitled in sudoer file? I want to assign the permissions on log files to those who are in sudoer file.

1 Answer 1

1

You cannot make sudo allow specific users READ-ONLY access to all files on your system.

You could try to authorize these users to a specific command that would allow READ-ONLY access. However, remember that any escape into an editor or allowing redirection could using sudo root perms allow file compromise.

I might suggest that you group the people who need access to log files into a single group. Then changing the group of these files to that group AND changing the permission so there is 'r' access for the group (chmod g+r and/or chmod g+rx where appropriate).

2
  • Thanx..got it.. may be I can add a backup user and then allow the same to do the necessary tasks.. Apr 27, 2015 at 7:50
  • Just do not allow users to directly login to such service accounts, have them login, and then setup sudo to allow them to change to that user (yes, you don't have to give them full root access to do that). That way you still have some accountability.
    – mdpc
    Apr 27, 2015 at 20:21

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .