On Tue, Aug 13, 2019 at 09:30:34AM +1200, Philip wrote:
> I just updated from Debian 8 to 9 and I'm getting the following error.  I'm
> guessing it's something to do with permissions?
> 
> Something to do with the create 640 root adm?
> 
> /etc/cron.daily/logrotate:
> error: unable to open /home/philip/logs/access.log.1 for compression

Could be permissions, yes.

> /home/philip/logs/*.log {
>       su philip philip
[...]
>       create 640 root adm

If you're running as "philip:philip" then you can't create files as
"root:adm".

Moreover, any existing files like /home/philip/logs/access.log.1 that
are owned by "root:adm" can't be written by a process running as
"philip:philip".

Most likely, what you want to do is replace the "create 640 root adm"
with "create 640 philip philip", and then verify/change the ownership
of any existing files, as well as the directory they're in, so that
the logrotate process running as "philip:philip" can read and write
everything.

Reply via email to