harbor/make/photon/log/logrotate
Wenkai Yin 696264bee9 Run logrotate as user 10000 to avoid issue #6895 (#6913)
This commit fixes issue #6895 by running logrotate with user 10000

Signed-off-by: Wenkai Yin <yinw@vmware.com>
2019-02-19 13:18:45 +08:00

6 lines
250 B
Bash
Executable File

#!/bin/sh
# run the logrotate with user 10000, the state file "/var/lib/logrotate/logrotate.status"
# is specified to avoid the permission error
sudo -u \#10000 -E /usr/sbin/logrotate -s /var/lib/logrotate/logrotate.status /etc/logrotate.conf
exit 0