I'm trying to allow users to read log files. In debian users in group adm is allows to read many log files. (Ref : https://wiki.debian.org/SystemGroups)So my plan is to use sudo and allow users to run commands like ail, less, more on log files as they in adm group.My try was something like below and it didn't work.User website is the account I have hosted my website.Users user1, user2 are the developers who work on website and trying to look at log files.Config: user1 ALL=(website:adm) /bin/tail /var/www/error.logcommand: sudo -u website tail /var/www/error.logThat I did wrong here?Thanks!
How to allow debian user to run a command as in a specific group using sudo?
sudo;logs;group
You need to tell sudo to change groups:sudo -g adm tail /var/www/error.log(as one of the appropriate users).Alternatively, you could just add the users to the adm group, it's only used for log files in Debian nowadays...