LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Cron Deamon Problem (https://www.linuxquestions.org/questions/linux-newbie-8/cron-deamon-problem-4175424606/)

ruskie77 08-29-2012 10:12 AM

Cron Deamon Problem
 
Hi everyone, I'm a real newb, and could do with a little help.

I have a linux web server (a vps) and everything is running just fine, I don't tend to mess about with things too much.

anyway. A couple of days ago my administrator email account has started recieving emails like this (every 20 minutes!)

subject:
Cron <smmsp@mydomain> test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp

message
mkdir: cannot create directory '/var/run/sendmail': Permission denied



Ok, I've had a good search around and I think I've been breached. I cannot find any scheduled tasks anywhere (I certainly havn't set any up) and I cannot find the cron script to remove it.

Any help would be really really good as my email goes ping every 20 minutes with the same email!

of course, I've changed all of my access passwords and updated the server software, just in case I have been breached.

Thanks in advance

colucix 08-29-2012 11:10 AM

Hi and welcome to LinuxQuestions! :)

I don't think your system has been breached: have you looked for a crontab script in /etc/cron.d/? Is there a file named "sendmail" inside it?

Please, provide as many details as possible about your issue (Linux OS, sendmail version and so on). If it turns out that it's really a security issue, take in mind that you can report your own post and ask a moderator to move it into the Linux - Security forum (anyway, I think Linux - Server could be a more suitable place).

ruskie77 08-29-2012 11:24 AM

Yes there is.
Most of it is commented out (I assume that starting a line with a # comments it)
the only bit that isn't commented out is,

#------------------------------------------------------------------------------
# Every so often, give sendmail a chance to run the MSP queues.
#
*/20 * * * * smmsp test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-msp
#
#------------------------------------------------------------------------------
# Every so often, give sendmail a chance to run the MTA queues.
# Will also run MSP queues if enabled
#
#*/10 * * * * root test -x /etc/init.d/sendmail && /usr/share/sendmail/sendmail cron-mta
#
#------------------------------------------------------------------------------

which I guess is the instruction for it to send something every 20 minutes.
The only other line that's not commented is further up in the file,
MAILTO=root

that's it really... I can't see why this would suddenly cause a problem out of the blue, considering that I've not changed any folder permissions, or adjusted this file.

In the meantime I'll try commenting out that */20 line for now and see if that's a quick fix, but I am intruiged as to why it just started happening.


Thanks for your help!

ruskie77 08-30-2012 04:21 AM

Well, for those of you that have a similar problem, commenting out that line did stop the emails from coming in...
Still a mystery as to why it all began though!

many thanks to colucix for his pointing me in the right direction

segmentation_fault 08-30-2012 07:07 AM

I think the script is fine the way it was. The problem is with the permissions of /var/run/sendmail
Could you post the output of
Code:

$ ls -l /var/run/sendmail

thomassisson 07-14-2013 11:29 AM

Output of ls -l /var/run/sendmail permissions for Sendmail program
 
Quote:

Originally Posted by segmentation_fault (Post 4768225)
I think the script is fine the way it was. The problem is with the permissions of /var/run/sendmail
Could you post the output of
Code:

$ ls -l /var/run/sendmail

Since no one has responded to your request and no one else seems to understand the problem, I will post mine in hopes that you can help. This question is posted all over the Internet, but I have yet to find the solution.

Code:

$ ls -l /var/run/sendmail
total 0
drwxrwsr-x 2 smmsp smmsp  40 Jul 13 23:54 msp
drwxr-sr-x 2 root  smmta 100 Jul 14 11:39 mta
drwxrwsr-x 2 root  smmsp  60 Jul 14 12:21 stampdir

and just in case

Code:

$ ls -l /var/run
...
drwxr-sr-x 5 root      smmta      100 Jul 13 23:54 sendmail
...



All times are GMT -5. The time now is 07:25 AM.