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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -