[LTP] [PATCHv2] logrotate: fix permission issue for test2
Petr Vorel
pvorel@suse.cz
Thu Jun 20 07:09:00 CEST 2024
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.
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