[LTP] [PATCHv2] logrotate: fix permission issue for test2
Po-Hsu Lin
po-hsu.lin@canonical.com
Thu Jun 20 08:43:34 CEST 2024
On Thu, Jun 20, 2024 at 1:09 PM Petr Vorel <pvorel@suse.cz> wrote:
> Hi Po-Hsu,
>
> > When running this logrotate test on Ubuntu, this test will fail with:
> > logrotate_tests 2 TINFO: sleep 1 min to wait for rotating logs
> > logrotate_tests 2 TFAIL: [ -f /var/log/tst_largelogfile.1.gz ] failed
> unexpectedly
> > logrotate_tests 2 TFAIL: Failed to create a compressed file
>
> > Look more closely to what this test is trying to do we will see there
> > are two issues here in the tst_largelog.conf:
>
> > 1. "include /etc/logrotate.d"
> > This will rotate other log files defined here, since we are just testing
> > the log rotation capability I think there is no need to rotate log files
> > other than the testfile itself.
>
> BTW (for next time): I would have separated these 2 changes into 2 commits.
>
> OK no problem,
thank you.
Po-Hsu
> Kind regards,
> Petr
>
> > 2. Permission issue
> > Trying to rotate the target file on Ubuntu will cause the following
> error:
> > error: skipping "/var/log/tst_largelogfile" because parent directory
> has
> > insecure permissions (It's world writable or writable by group
> which
> > is not "root") Set "su" directive in config file to tell
> logrotate
> > which user/group should be used for rotation.
>
>
>
More information about the ltp
mailing list