Welcome! Log In Create A New Profile

Advanced

nginx logrotate : permission denied

April 28, 2016 04:28AM
Hi,

I am getting below error in error.log file post logrotate :
-------------------------------------------------------------------------------
open() "/var/log/nginx/access_abcd.log" failed (13: Permission denied)
--------------------------------------------------------------------------------
post logrotate , new files with name /var/log/nginx/access_abcd.log are getting created but logs are still getting written in old file with name /var/log/nginx/access_abcd.log-20160428

logrotate file is as below :
---------------------------------------------
/var/log/nginx/*.log /usr/local/nginx/logs/access.log {
daily
missingok
rotate 52
compress
delaycompress
notifempty
create 644 nginx root
sharedscripts
postrotate
[ -f /usr/local/nginx/run/nginx.pid ] && kill -USR1 `cat /usr/local/nginx/run/nginx.pid`
endscript
}
------------------------------------------------
here /usr/local/nginx/logs/access.log are getting rotated correctly but not /var/log/nginx/*.log.

permsions and owners of files are as follow :
-rw-r--r-- 1 nginx root 0 Apr 28 03:21 access_abcd.log

machine is of linux flavour.
Subject Author Posted

nginx logrotate : permission denied

omkar_jadhav_20 April 28, 2016 04:28AM

Re: nginx logrotate : permission denied

itpp2012 April 28, 2016 04:45AM

Re: nginx logrotate : permission denied

omkar_jadhav_20 April 28, 2016 05:40AM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 118
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 500 on July 15, 2024
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready