On 2019-08-13 06:59 +0300, Teemu Likonen wrote: > phi...@treads.nz [2019-08-13T09:30:34+12] 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 >> error: unable to open /home/philip/logs/error.log.1 for compression >> run-parts: /etc/cron.daily/logrotate exited with return code 1
Perhaps, but it is hard to tell without seeing the reason why logrotate failed to open the file. You could try to rebuild it with the attached patch (untested). > It could be because of /home not being writable for logrotate service. > See Sven Joachim's message in 2019-07-21: > > https://lists.debian.org/debian-user/2019/07/msg01102.html No, the logrotate package in Debian 9 does not use a systemd unit.
--- logrotate-3.11.0.orig/logrotate.c +++ logrotate-3.11.0/logrotate.c @@ -670,7 +670,8 @@ static int compressLogFile(char *name, s sprintf(compressedName, "%s%s", name, log->compress_ext); if ((inFile = open(name, O_RDWR | O_NOFOLLOW)) < 0) { - message(MESS_ERROR, "unable to open %s for compression\n", name); + message(MESS_ERROR, "unable to open %s for compression: %s\n", + name, strerror(errno)); return 1; }