Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 234272

Summary: vixie-cron crontab -e calling vi
Product: Gentoo Linux Reporter: Clayton Clarke <claytonc>
Component: Current packagesAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: VERIFIED INVALID    
Severity: normal CC: darkside
Priority: High    
Version: 2008.0   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: vixiecron examples

Description Clayton Clarke 2008-08-08 21:08:22 UTC
this bug is only apparent if you do not have vim installed, second of all, upon user crontab -e (rather than # sudo crontab -e) a permission denied error is thrown out.
Comment 1 Clayton Clarke 2008-08-08 21:15:55 UTC
Created attachment 162544 [details]
vixiecron examples

as seen in the attachment, running crontab -e as normal user results in chdir permission error, running it as sudo results in vim issue and running as root is fine works as expected, except that you start with an empty root user based crontab, if it doesn't already exist.  If this is considered normal and intended behaviour then please state why and i will mark or delete as necessary
Comment 2 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-08 21:17:22 UTC
I think crontab -e honors $EDITOR, what is that set to for you?
Comment 3 Jeremy Olexa (darkside) (RETIRED) archtester gentoo-dev Security 2008-08-08 21:24:29 UTC
(In reply to comment #1)
> Created an attachment (id=162544) [edit]
> vixiecron examples
> 
> as seen in the attachment, running crontab -e as normal user results in chdir
> permission error, running it as sudo results in vim issue and running as root
> is fine works as expected, except that you start with an empty root user based
> crontab, if it doesn't already exist.  If this is considered normal and
> intended behaviour then please state why and i will mark or delete as necessary
> 

Alright that explains it all. set EDITOR properly and add yourself to the cron group. This should be enough after you log out and back in. Re-open bug if that doesn't help.
Comment 4 Clayton Clarke 2008-08-09 14:25:50 UTC
thanks for the help guys it does indeed honour #editor (set as nano :) ) and the group advice really helped, i add my local user to cron and crontab, and it fully resolved all user issues, except sudo, but that ain't really a problem. as long as user custom crontab works, all is ok :)
Comment 5 Clayton Clarke 2008-08-09 14:30:40 UTC
this bug, seems to only occur under sudo. Users who are not in the cron group will get a permission error instead. as of now closed, if anyone wishes further investigation into the sudo crontab -e issue. then leave a message