while executing logrotate script manually I am receiving an error as follows. $ logrotate -vf /apps/web/scripts/Logroate-web.conf

truncating /apps/oracle/admin/mserver/adf12dev/servers/adf_1/logs/udara_1.out set default create context error: error creating unique temp file: Permission denied

Please let me know why is that and how to eliminate . Please note I am running this script using non root. user. thanks

  • Does your non-root user have permissions to write to that directory? – chicks Jun 6 '17 at 12:45

I was receiving the same error running as non-root user; though this was not preventing logrotate from rotating my app logs. In my case, I was attempting to write status to /dev/null:

/usr/sbin/logrotate -v -s /dev/null /path/to/logrotate.conf

Removing the -s option (writes to default status file, i.e. /var/lib/logrotate.status) resulted in the same error message. Updating to a new path removed the error message:

/usr/sbin/logrotate -v -s /path/to/logrotate.status /path/to/logrotate.conf

Hope this helps.

logrotate -v -s  /rlsothrbackup/rlsspool/MERGEDSPL/log.status  --force /rlsothrbackup/rlsspool/MERGEDSPL/logrotate.cnf

This worked for me when I want the log to be rotated within rlsothrbackup/rlsspool/MERGEDSPL/

  • 1
    This cannot work for OP as he has "permission denied" error – bgtvfr Oct 16 '18 at 12:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.