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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -