# Give other users access to logs



## osax (Feb 3, 2010)

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.


----------



## achix (Feb 3, 2010)

You can either add the user in question to the wheel group, or modify /etc/newsyslog.conf and alter the mode on the 
	
	



```
/var/log/maillog
```
 line to read e.g. 644
The latter will make the file readable by all users.


----------



## jalla (Feb 3, 2010)

Change the permissions in /etc/newsyslog.conf


----------



## jalla (Feb 3, 2010)

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



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


----------



## osax (Feb 3, 2010)

*Thanx Solved*

Thank you,

newsyslog.conf did the trick.


----------



## tangram (Feb 3, 2010)

Or you could configure security/sudo.


----------

