tier1.jp

Debian system group which allows a normal user to read syslogs

STATUS: Frozen (2019-11-17)

No more updates for this guide.

Please refer to the TOC page.

/var/log and journalctl are very important to check system well being.

The problem is, you need root privilege.

user$ less /var/log/syslog
/var/log/syslog: Permission denied

Rev2

Add warning section about sudo.

Read /var/log files from a normal user

Debian provides various system groups, and adm is what we want in this case.

It allows a user to read under /var/log.

root# adduser USER adm

Attention!

You should reboot the system.

user$ groups
user adm cdrom floppy audio dip video plugdev netdev
user$ less /var/log/syslog
...(log can be readable now)

journalctl case

So is systemd-journal system group.

No sudo for log monitoring

Avoid using sudo especially with the initial sudo group just to look syslogs.

As shown above, we do NOT need sudo for log monitoring.

published: MODIFIED: