Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.
/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

migrated from stackoverflow.com Jan 10 '10 at 20:00

This question came from our site for professional and enthusiast programmers.

    
Cross posted here: serverfault.com/questions/101326/crontab-e-fails-to-run –  Dennis Williamson Jan 10 '10 at 21:39
add comment

3 Answers

/usr/bin/editor is apparently a script, that on line 40 fails to start the actual editor, apparently trying to execute the crontab file to edit, perhaps because the path to the editor is supposed to be supplied (in an environment variable?) and isn't.

Just guessing. Have a look at that script and Google on /usr/bin/editor.

share|improve this answer
1  
Nice guess! If it was so, you could try to add export EDITOR="nano" in your .bashrc (assuming you're using bash) –  dag729 Jan 10 '10 at 21:07
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

probably that's just a permission issue of /tmp: have you already checked it with ls -la?

share|improve this answer
add comment

Your Answer

 
discard

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