View previous topic :: View next topic |
Author |
Message |
arrummzen n00b
Joined: 18 Apr 2006 Posts: 52
|
Posted: Sat Sep 29, 2007 4:48 am Post subject: Help, I can't edit my crontab anymore! |
|
|
I recently did an emerge -avDu world (after not doing one for about two months). I normally use 'crontab -e' to edit my crontab. As root it seems to work fine, but as non root I get the error:
Code: |
cannot chdir(/var/spool/cron), bailing out.
/var/spool/cron: Permission denied
|
Has anyone else had this problem? What is the best way to fix it?
Thank you for your time,
Arrummzen |
|
Back to top |
|
|
Kosmas Apprentice
Joined: 14 Sep 2006 Posts: 276 Location: Greece
|
Posted: Sat Sep 29, 2007 7:13 am Post subject: |
|
|
Hello there,
Don't worry about it, just see if /var/spool/cron exists and if not create it. Then change the permissions to cron:root and 755 for the directory.
Then check for a dir /var/spool/cron/crontabs and if it does not exist create it with permissions root:crontab and 1730 (yes 1730 not 730 )
Last check for directory /var/spool/lastrun with permissions root:root and 750
That should do the job. |
|
Back to top |
|
|
swimmer Veteran
Joined: 15 Jul 2002 Posts: 1330 Location: Netherlands
|
Posted: Sat Sep 29, 2007 8:37 am Post subject: |
|
|
Or you could update to the latest sys-process/cronbase which should do the same for you ... |
|
Back to top |
|
|
Mousee Apprentice
Joined: 29 Mar 2004 Posts: 291 Location: Illinois, USA
|
Posted: Thu Oct 04, 2007 7:33 pm Post subject: |
|
|
swimmer wrote: | Or you could update to the latest sys-process/cronbase which should do the same for you ... |
Which, FYI, doesn't work at all. Re-emerging cronbase or not doesn't apply the correct permissions. You have to do it manually or revert to an older, working version.
Many thanks to Kosmas for the nice "how-to"... took me about an hour to figure it out, heh. |
|
Back to top |
|
|
patches n00b
Joined: 03 Aug 2007 Posts: 11 Location: IRC
|
Posted: Sun Oct 07, 2007 5:26 pm Post subject: RE: Help, I can't edit my crontab anymore! |
|
|
Some of my users on the server i run have had this problem and reported it as an error on a number of occasions. After looking in to it, i finally found that it was simply the question of adding the user to the cron group. It dose seem to work fine after that, thou they need to run crontab -e first sometimes. P.S. incase you're wondering the default for my server is to just have an empty cron.deny file in /etc/ to allow all users in the cron group to use the crontab. I've read the documents on the crontab but i dont plan on changing it any time soon. vixie-cron version 4.1-r10 USE="pam -debug (-selinux)" |
|
Back to top |
|
|
magari n00b
Joined: 23 Aug 2007 Posts: 21
|
Posted: Fri Oct 17, 2008 2:01 pm Post subject: |
|
|
So...
This still isn't fixed.
I had to create /var/spool/lastrun to get it working. Is there even a bug submitted for this? Anyone know how I could check? _________________ hackdmz.net |
|
Back to top |
|
|
notHerbert Advocate
Joined: 11 Mar 2008 Posts: 2228 Location: 45N 73W
|
Posted: Fri Oct 17, 2008 7:45 pm Post subject: |
|
|
Do you mean /var/spool/cron/lastrun? Did you add yourself to the crontab group after emerging cronbase? |
|
Back to top |
|
|
magari n00b
Joined: 23 Aug 2007 Posts: 21
|
Posted: Wed Oct 22, 2008 12:33 pm Post subject: |
|
|
No /var/spool/cron/lastrun existed after emerging cronbase and vixie-cron
I did add myself to the cron group as well as the crontab group, logged out and logged back in... no go...
not until I added /var/spool/lastrun did it start working.
I have no idea why honestly... if it helps im running a gentoo-hardened profile. _________________ hackdmz.net |
|
Back to top |
|
|
lyallp Veteran
Joined: 15 Jul 2004 Posts: 1589 Location: Adelaide/Australia
|
Posted: Mon Jan 17, 2011 11:57 pm Post subject: |
|
|
I found I simply had to Code: | # chmod o+rx /var/spool/cron | and things started working. _________________ ...Lyall |
|
Back to top |
|
|
atmosx n00b
Joined: 17 Jul 2009 Posts: 42
|
Posted: Sat Jan 14, 2012 3:13 am Post subject: |
|
|
I tried all the above solutions nothing worked, so I installed fcron and removed vixie-cron and now works.. fine and it's even a more flexible vixie-cron replacement. |
|
Back to top |
|
|
Princess Nell l33t
Joined: 15 Apr 2005 Posts: 918
|
Posted: Sat Jan 14, 2012 2:35 pm Post subject: |
|
|
There's definitely a bug, at least here on am64.
Follow Kosmas' instructions, except that /var/spool/cron ownership is root:cron, not cron:root.
No need for anyone to be in the cron group. |
|
Back to top |
|
|
miroR l33t
Joined: 05 Mar 2008 Posts: 826
|
Posted: Sun Aug 16, 2015 11:50 am Post subject: |
|
|
Princess Nell wrote: | There's definitely a bug, at least here on am64.
Follow Kosmas' instructions, except that /var/spool/cron ownership is root:cron, not cron:root.
No need for anyone to be in the cron group. |
I have some issues with cron:
(current title, but I am uncertain what it is)
The new cronbase' issues with grsec RBAC policy
https://forums.gentoo.org/viewtopic-t-1026832.html
(again, I'm uncertain where my issues will end at, but they concern cron)
These issues appear to span in long years...
Any more on this? Such as is it still the case to fix those permissions in some of the fashions proposed in this topic? |
|
Back to top |
|
|
miroR l33t
Joined: 05 Mar 2008 Posts: 826
|
Posted: Sun Aug 16, 2015 4:07 pm Post subject: |
|
|
This issue is, I think solved in all new cronbase packages...
But if anyone has issues deploying RBAC policy for their grsec-hardened kernel, you can look over:
crontab RBAC policy
http://forums.grsecurity.net/viewtopic.php?f=5&t=4253
Regards! |
|
Back to top |
|
|
|