linux - logrotate -AWS S3 cli Unable to locate credentials -
i have following logrotate configuration. postrotate part fails 'unable locate credentials' error when invoked through cron, same line aws s3 cp /var/log/tomcat7/ s3://logs/prod/node3/ --recursive --exclude "*" --include "*node3.gz"
works when run manually terminal root user.
/var/log/tomcat7/*.log { copytruncate daily dateext dateformat -%y-%m-%d-%s-node3 rotate 1 compress missingok sharedscripts postrotate aws s3 cp /var/log/tomcat7/ s3://logs/prod/node3/ --recursive --exclude "*" --include "*node3.gz" endscript }
how can make sure logrotate runs root user. there other way fix ?
Comments
Post a Comment