LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 01-19-2012, 04:33 PM   #1
willrocks
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Rep: Reputation: Disabled
Unhappy Cron Error: Cron <EMAIL> /tmp/.X11-unix/.bash/update >/dev/null 2>&1 (failed)


I keep getting this email from my Debian Linux server:

Subject: Cron <MY_EMAIL> /tmp/.X11-unix/.bash/update >/dev/null 2>&1 (failed)
Body: /bin/sh: cannot create /dev/null: Permission denied

Linux Version: Debian GNU/Linux 6.0
 
Old 01-19-2012, 06:12 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,950
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
Who owns the "/tmp/.X11-unix/.bash/update" file and /tmp/.X11-unix directory? Run 'stat' on them like 'stat /tmp/.X11-unix/.bash/update /tmp/.X11-unix/.bash/'.

Last edited by unSpawn; 01-19-2012 at 06:14 PM. Reason: //More *is* more
 
Old 01-19-2012, 06:21 PM   #3
willrocks
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Who owns the "/tmp/.X11-unix/.bash/update" file and /tmp/.X11-unix directory? Run 'stat' on them like 'stat /tmp/.X11-unix/.bash/update /tmp/.X11-unix/.bash/'.
There doesn't seem to be a "/tmp/.X11-unix/.bash/update" file?

# stat /tmp/.X11-unix
File: `/tmp/.X11-unix'
Size: 4096 Blocks: 8 IO Block: 4096 directory
Device: 801h/2049d Inode: 1994341 Links: 2
Access: (1777/drwxrwxrwt) Uid: ( 0/ root) Gid: ( 0/ root)
Access: 2012-01-19 18:22:29.000000000 -0600
Modify: 2012-01-18 01:31:29.000000000 -0600
Change: 2012-01-18 01:31:29.000000000 -0600

Looks like root owns "/tmp/.X11-unix"

This is the only cron job running:

*/15 * * * * cd /var/www/<domain>.com/cron/;php check_payments1.php

The error email is being sent every minute.
 
Old 01-19-2012, 06:44 PM   #4
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,950
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
Unless you get email redirected from other accounts (see for example /etc/aliases), what does 'crontab -l' for your user account (as in "<MY_EMAIL>") return?
 
Old 01-19-2012, 06:47 PM   #5
willrocks
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
Unless you get email redirected from other accounts (see for example /etc/aliases), what does 'crontab -l' for your user account (as in "<MY_EMAIL>") return?
Yes I am getting email from other accounts:

# /etc/aliases
info: <MY_EMAIL>
webmaster: <MY_EMAIL>
postmaster: <MY_EMAIL>
administrator: <MY_EMAIL>
# Webmin: Admin
admin: <MY_EMAIL>
abuse: <MY_EMAIL>
 
Old 01-19-2012, 07:03 PM   #6
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,950
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
I see I should have phrased that differently.
Wwhat does 'crontab -l' for your user, as well as for any other accounts you get email redirected from (see /var/spool/cron as root), return?
 
Old 01-19-2012, 07:15 PM   #7
willrocks
LQ Newbie
 
Registered: Jan 2012
Posts: 5

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by unSpawn View Post
I see I should have phrased that differently.
Wwhat does 'crontab -l' for your user, as well as for any other accounts you get email redirected from (see /var/spool/cron as root), return?
Ok, that's the issue. The info user had a cron job "/tmp/.X11-unix/.bash/update >/dev/null 2>&1" set to run every minute.

I've commented out the job. But do you have any idea what it's supposed to do?
 
Old 01-19-2012, 08:19 PM   #8
chrism01
Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.5, Centos 5.10
Posts: 16,225

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Can you read the code inside 'update'?
 
Old 01-20-2012, 12:08 AM   #9
unSpawn
Moderator
 
Registered: May 2001
Posts: 26,950
Blog Entries: 54

Rep: Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732Reputation: 2732
Quote:
Originally Posted by willrocks View Post
Ok, that's the issue. The info user had a cron job "/tmp/.X11-unix/.bash/update >/dev/null 2>&1" set to run every minute.
I've commented out the job. But do you have any idea what it's supposed to do?
Since you already told us there doesn't seem to exist a "/tmp/.X11-unix/.bash/update" file that will be hard to find out. I do find it odd: even though the /tmp/.X11-unix directory has octal 1777 access perms, anyone could write something there, it should be reserved for only Xorg sockets.
What does (as root) 'getent passwd info; last info; lastlog info; chage -l info' return?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Strange Cron directories: /var/spool/cron/cron.GfqqGO Woodsman Slackware 4 05-11-2011 02:37 PM
Cron error: help with cron and changing system time hbbtstar Linux - Software 1 10-15-2009 09:10 PM
adding a perl script to cron.daily / cron.d to setup a cron job CrontabNewBIE Linux - Software 6 01-14-2008 08:16 AM
cron not working from crontab nor form /etc/cron/cron.d. What did SuSE change? JZL240I-U Suse/Novell 11 01-04-2007 01:57 AM
bash script & cron probs. skubik Programming 17 10-16-2005 02:00 PM


All times are GMT -5. The time now is 07:19 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration