Cron cannot move mslog to mslog.1: Permission denied
Cron cannot move mslog to mslog.1: Permission denied
I am using MagicSpam for cPanel. I am getting a message (emailed) from my systems cron daemon indicating that it can not rename the log file.
mv: cannot move `/var/log/magicspam/mslog' to `/var/log/magicspam/mslog.1': Permission denied
Please advise.
mv: cannot move `/var/log/magicspam/mslog' to `/var/log/magicspam/mslog.1': Permission denied
Please advise.
Re: Cron cannot move mslog to mslog.1: Permission denied
Hello sfligg,
Thank you for your question! It appears as though there is a permissions issue here. All of the log files should be owned by the 'magicspam' user. You can repair this with:
You will also want to make sure that the 'magicspam' user has a home directory that exists. You can check this directory exists, and make sure it is owned by the MagicSpam user with the following:
If the 'magicspam' user's home directory does not exist or is not owned by the 'magicspam' user, something is very wrong and we might recommend removing the magicspam-cpanel package and reinstalling the latest package from our downloads page (http://www.magicspam.com/download/). Don't worry about reinstalling as no settings will be lost.
Thanks, and let us know what you find!
-- MagicSpam Support Team --
Thank you for your question! It appears as though there is a permissions issue here. All of the log files should be owned by the 'magicspam' user. You can repair this with:
Code: Select all
chown -R magicspam:magicspam /var/log/magicspam
Code: Select all
ls -ld ~magicspam
Thanks, and let us know what you find!
-- MagicSpam Support Team --
Re: Cron cannot move mslog to mslog.1: Permission denied
Thank you. I just applied the ownership change (magicspam had a home directory). I will see what happens tomorrow, but I am sure it will be okay.
Re: Cron cannot move mslog to mslog.1: Permission denied
No joy, it didn't work. I am still getting an error message from the cron daemon.
I did notice the subject line of the email from the cron says
/usr/share/magicspam/bin/rotate_logs /var/log/magicspam/mslog
Should I change ownership of all files in /usr/share/magicspam/bin/ to magicspam as well?
I did notice the subject line of the email from the cron says
/usr/share/magicspam/bin/rotate_logs /var/log/magicspam/mslog
Should I change ownership of all files in /usr/share/magicspam/bin/ to magicspam as well?
Re: Cron cannot move mslog to mslog.1: Permission denied
Hello sfligg,
Thank you for your response and for the information, we do feel like we're making progress though. Just so you know, it shouldn't be necessary to change the ownership of the rotate_logs utility, the error indicates that it is running.
Firstly, please check and make sure you are using the latest version of MagicSpam for cPanel WHM (1.0.8-4). If you are not, please download the latest package from our download site (http://www.magicspam.com/download/) and update.
After you have verified you are using the latest version of MagicSpam, please run an md5sum on the rotate_logs utility and report back the output to us. This will help us to make sure that the utility is not corrupted in any way:
Another step to try would be to reset your log days setting (how many days worth of logs to keep) back to the default of 7 days. We have seen issues in the past where really large retention periods caused problems.
Finally, please run the following command and send us back the output. We want to make sure there is nothing else odd going on in your log directory:
Thank you for your patience while we work through this issue,
-- MagicSpam Support Team --
Thank you for your response and for the information, we do feel like we're making progress though. Just so you know, it shouldn't be necessary to change the ownership of the rotate_logs utility, the error indicates that it is running.
Firstly, please check and make sure you are using the latest version of MagicSpam for cPanel WHM (1.0.8-4). If you are not, please download the latest package from our download site (http://www.magicspam.com/download/) and update.
After you have verified you are using the latest version of MagicSpam, please run an md5sum on the rotate_logs utility and report back the output to us. This will help us to make sure that the utility is not corrupted in any way:
Code: Select all
md5sum /usr/share/magicspam/bin/rotate_logs
Finally, please run the following command and send us back the output. We want to make sure there is nothing else odd going on in your log directory:
Code: Select all
ls -latrR /var/log/magicspam/
-- MagicSpam Support Team --
Re: Cron cannot move mslog to mslog.1: Permission denied
Sorry for the delay in my response.
I do have the latest version installed and still have default settings (days = 7).
Below is the output as requested:
root@XXXXXX [/usr/share/magicspam/bin]# md5sum /usr/share/magicspam/bin/rotate_logs
0d3e92bfa3eba073a005c33b141f1071 /usr/share/magicspam/bin/rotate_logs
root@XXXXXX [/usr/share/magicspam/bin]#
root@XXXXXX [/usr/share/magicspam/bin]# ls -latrR /var/log/magicspam/
/var/log/magicspam/:
total 3156
-rw-r--r-- 1 magicspam magicspam 749 Jun 30 23:46 .counter2.dat.06
drwxr-xr-x 2 magicspam magicspam 4096 Jul 1 00:04 ./
drwxr-xr-x 18 root root 4096 Jul 13 09:33 ../
-rw-rw-r-- 1 magicspam magicspam 3203202 Jul 13 09:41 mslog
-rw-r--r-- 1 magicspam magicspam 749 Jul 13 09:41 .counter2.dat.07
root@XXXXXX [/usr/share/magicspam/bin]#
I do have the latest version installed and still have default settings (days = 7).
Below is the output as requested:
root@XXXXXX [/usr/share/magicspam/bin]# md5sum /usr/share/magicspam/bin/rotate_logs
0d3e92bfa3eba073a005c33b141f1071 /usr/share/magicspam/bin/rotate_logs
root@XXXXXX [/usr/share/magicspam/bin]#
root@XXXXXX [/usr/share/magicspam/bin]# ls -latrR /var/log/magicspam/
/var/log/magicspam/:
total 3156
-rw-r--r-- 1 magicspam magicspam 749 Jun 30 23:46 .counter2.dat.06
drwxr-xr-x 2 magicspam magicspam 4096 Jul 1 00:04 ./
drwxr-xr-x 18 root root 4096 Jul 13 09:33 ../
-rw-rw-r-- 1 magicspam magicspam 3203202 Jul 13 09:41 mslog
-rw-r--r-- 1 magicspam magicspam 749 Jul 13 09:41 .counter2.dat.07
root@XXXXXX [/usr/share/magicspam/bin]#
Re: Cron cannot move mslog to mslog.1: Permission denied
Hello sfligg,
Thank you for your reply and for the information. We were discussing your case and there is definitely something interesting going on here. We are curious, is SELinux enabled on your server? If it is, is it running in permissive mode or is it enforcing? This could cause a problem if it was enforcing at the moment!
Also, please try the following, in case cagefs is being used on your server:
We look forward to your reply,
-- MagicSpam Support Team --
Thank you for your reply and for the information. We were discussing your case and there is definitely something interesting going on here. We are curious, is SELinux enabled on your server? If it is, is it running in permissive mode or is it enforcing? This could cause a problem if it was enforcing at the moment!
Also, please try the following, in case cagefs is being used on your server:
Code: Select all
/usr/sbin/cagefsctl --disable magicspam
-- MagicSpam Support Team --
Re: Cron cannot move mslog to mslog.1: Permission denied
SELinux is not enabled and cagefs is not being used.
Thank you.
Thank you.
Re: Cron cannot move mslog to mslog.1: Permission denied
Hell sfligg,
Thank you for you reply and for checking that. At this stage we think that something is *very* unusual and possibly esoteric. If you could, please contact us directly via email at support@magicspam.com so that we can hopefully get this sorted out for you right away.
-- MagicSpam Support Team --
Thank you for you reply and for checking that. At this stage we think that something is *very* unusual and possibly esoteric. If you could, please contact us directly via email at support@magicspam.com so that we can hopefully get this sorted out for you right away.
-- MagicSpam Support Team --
Who is online
Users browsing this forum: No registered users and 5 guests