Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #211604

Re: Debian 10 logrotate

From Sven Joachim <svenjoac@gmx.de>
Newsgroups linux.debian.user
Subject Re: Debian 10 logrotate
Date 2019-07-21 12:00 +0200
Message-ID <ymgNj-t6-1@gated-at.bofh.it> (permalink)
References <ymgtY-mh-17@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 2019-07-21 02:42 +0000, Tan Shao Yi wrote:

> I upgraded to Debian 10 recently and it looks like logrotate is not
> working on files outside the /var directory:

This is correct.

> For example,
>
> Jul 21 00:00:01 server-name logrotate[8874]: error: error renaming
> /usr/local/apache/logs/https-error_log.12.gz to
> /usr/local/apache/logs/https-error_log.13.gz: Read-only file system
> Jul 21 00:00:03 server-name logrotate[8874]: error: unable to open /usr/local/backup/mysql/mysql.sql.1 for compression
>
> The files are present, and I am able to logrotate them manually as
> root when I run logrotate against the config files in
> /etc/logrotate.d--it just fails when it is run automatically.
>
> May I know if something has changed recently to cause this?

It is the ProtectSystem=full directive in logrotate.service which causes
/usr to be mounted read-only for logrotate.  See the SANDBOXING section
in systemd.exec(5).

You can make /usr/local writable with
"systemctl edit logrotate.service", enter the following line:

ReadWritePaths=/usr/local

in your editor and you're done.

Cheers,
       Sven

Back to linux.debian.user | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

Re: Debian 10 logrotate Sven Joachim <svenjoac@gmx.de> - 2019-07-21 12:00 +0200
  Re: Debian 10 logrotate Étienne Mollier <etienne.mollier@mailoo.org> - 2019-07-21 12:50 +0200
  Re: Debian 10 logrotate Gene Heskett <gheskett@shentel.net> - 2019-07-25 08:10 +0200

csiph-web