Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

when i run "crontab -e" i get:

/usr/bin/editor: line 40: /tmp/crontab.BTXqyZ/crontab: Permission denied
/usr/bin/editor: line 40: exec: /tmp/crontab.BTXqyZ/crontab: cannot execute: Success
crontab: "/usr/bin/editor" exited with status 126

crontab -e was working fine a few months ago. a cron job i set up few month ago is still running successfully.

i wanted to create a new cronjob for another program and i got the above error....

share|improve this question
    
Cross posted here: superuser.com/questions/93944/… –  Dennis Williamson Jan 10 '10 at 21:36
add comment

2 Answers

You have a permissions problem. Your /tmp directory may be mounted noexec and for some reason your version of cron doesn't like that, /tmp may have some sort of silly permissions on it (it should be 1777), your /usr/bin/editor is up the creek, or whatever /usr/bin/editor points to may be similarly broken. I'd test /usr/bin/editor on something else to eliminate that as the source of the problem, then go to town on /tmp.

share|improve this answer
add comment

May be /tmp access mode is wrong. Check it with ls -dla /tmp

Right mode for tmp is 1777 (drwxrwxrwt)

$ ls -dla /tmp drwxrwxrwt 7 root root 4096 Jan 12 00:00 /tmp

Correct it with sudo chmod 1777 /tmp. 1 is sticky bit http://en.wikipedia.org/wiki/Sticky_bit and 7 is read-write-execute for user, group, world

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.