ERROR --> Cron <root@[my domain name]> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
-
- Posts: 6
- Joined: Wed Feb 17, 2016 10:56 pm
ERROR --> Cron <root@[my domain name]> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
I'm receiving an email every day with the following:
I looked in the error.log and it showed a rejected connection from an IP in china that's known for port scanning.. I deleted the log and created a new log. The error.log is now empty but I still receive this email.
Code: Select all
/etc/cron.daily/logrotate:
error: nginx:8 unknown user 'nginx'
error: found error in /var/log/nginx/*log /var/log/nginx/domains/*log , skipping
Re: ERROR --> Cron <root@[my domain name]> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Have you nginx installed ?
If yes, is there a nginx user ?
You can edit logrotate or crond.daily or create a nginx user.
If yes, is there a nginx user ?
Code: Select all
grep nginx /etc/passwd
-
- Posts: 6
- Joined: Wed Feb 17, 2016 10:56 pm
Re: ERROR --> Cron <root@[my domain name]> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
Nginx is installed and running without any issues.
There is no nginx user in /etc/passwd. After I create a user 'nginx' what should I set the password to and where do I define this password?
There is no nginx user in /etc/passwd. After I create a user 'nginx' what should I set the password to and where do I define this password?
Re: ERROR --> Cron <root@[my domain name]> test -x /usr/sbin/anacron || ( cd / && run-parts --report /etc/cron.daily )
You dont need a password, you need create user whit nologin
Edited*****
On centos, in debian /sbin/login may vary.
You can read man pagefor more information
** I edit comand to do nologin shell.
Code: Select all
useradd -M nginx
On centos, in debian /sbin/login may vary.
Code: Select all
usermod -s /sbin/nologin nginx
** I edit comand to do nologin shell.