Give other users access to logs

I need to pull some stats from /var/log/maillog

but I can't do it as the root users,
how to I give other users access to the file?

obviously a chmod wont work, because the permissions will
keep getting overwritten.
 
You can either add the user in question to the wheel group, or modify /etc/newsyslog.conf and alter the mode on the
Code:
/var/log/maillog
line to read e.g. 644
The latter will make the file readable by all users.
 
achix said:
You can either add the user in question to the wheel group, or modify /etc/newsyslog.conf and alter the mode on the
Code:
/var/log/maillog
line to read e.g. 644
The latter will make the file readable by all users.

Note there's an optional 'owner:group' field as well if you need more granular access control.
 
Back
Top