1

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.log

command: sudo -u website tail /var/www/error.log

That I did wrong here?

Thanks!

1 Answer 1

1

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...

You must log in to answer this question.

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