LXC containers all have empty syslogs

JJB

New Member
May 11, 2016
2
0
1
45
Hi, I have a bunch of Ubuntu 14.04 and 16.04 lxc containers running, and every one of them has an empty /var/log/syslog file. Other files in the log directory like auth.log are fine. Is this normal? If so, is there a way I can enable syslogs to be written on each container?
 
syslog file was owned by root:root. Changed to syslog:adm and it seems to be ok now.
 
I have that problem on Ubuntu containers only.
Debian 8 template works fine.
 
You must chown for root:adm , and chmod the file (I have tested 777 with success, but I think it is possible with a lower value). And restart rsyslog
 
This is what i found on some Ubuntu post somewhere, and it works for me on Ubuntu 16.04 LXC containers

chown syslog:adm /var/log/syslog
chmod 644 /var/log/syslog
 
  • Like
Reactions: Shankar and Uriy