View previous topic :: View next topic |
Author |
Message |
nordic bro Guru
Joined: 25 Oct 2003 Posts: 585
|
Posted: Fri Oct 28, 2005 8:06 pm Post subject: vixie-cron; user can't exec crontab |
|
|
Feel kinda dumb because I know I'm missing something simple but cron will not allow non-root to create crontabs (vixie-cron-3.0.1-r4):
% crontab -u mike
/usr/bin/crontab: Permission denied.
(tried "crontab -e" also)
% l /usr/bin/crontab
-rwsr-x--- 1 root 19412 Apr 8 04 16:53 /usr/bin/crontab
Are these perms okay?
I did "gpasswd -a mike cron" and mike is in cron group; restarted vixie-cron also; tried a couple things I found searching but "mike" is unable to create a crontab. I also tried (variously) /etc/cron.{allow,deny}.
As root I created /var/*/mike; tried as "mike" to edit it; chown'd to "mike" and tried again. Same "Permission denied" no matter what.
Anyone know what I'm missing? |
|
Back to top |
|
|
Vitaliy Guru
Joined: 06 Apr 2004 Posts: 451 Location: Brooklyn, NY
|
Posted: Fri Oct 28, 2005 8:54 pm Post subject: |
|
|
Add user to cron group. |
|
Back to top |
|
|
Lotu Tux's lil' helper
Joined: 12 Sep 2004 Posts: 106 Location: Finland
|
Posted: Mon Nov 28, 2005 10:09 am Post subject: |
|
|
A late reply, but in case someone else is having the same problem and is looking for answer through search, the solution is to change the /usr/bin/crontab to belong to root:cron as it should.
Run this as root: Code: | chgrp cron /usr/bin/crontab |
Now users in cron group can use it. _________________ In a world without walls and fences, who needs Windows and Gates?
I'm an evil homosexual communist. |
|
Back to top |
|
|
jsporring n00b
Joined: 08 Sep 2004 Posts: 24
|
Posted: Tue Jan 17, 2006 10:40 am Post subject: user crontab'bing problems |
|
|
I've seen this problem on several threads, but none of the solutions offered seems to help me. I've got the following setup:
Code: |
sporring% crontab -e
/usr/bin/crontab: Permission denied.
sporring% which crontab
crontab: Command not found.
sporring% ls -l /usr/bin/crontab
-rwsr-x--- 1 root cron 30208 Aug 12 11:35 /usr/bin/crontab
sporring% groups sporring
tty wheel cron audio games usb users serial
sporring% cat /etc/cron.allow
sporring
sporring%
|
Any help would be much appreciated.
Best, Jon |
|
Back to top |
|
|
jsporring n00b
Joined: 08 Sep 2004 Posts: 24
|
Posted: Wed Jan 18, 2006 12:14 pm Post subject: Re: user crontab'bing problems |
|
|
It is working now following a machine boot. I guess that some bit somewhere in vixie-cron/gentoo had not noticed the change in and/or ownership/group membership, but this was corrected after the boot. |
|
Back to top |
|
|
jfox n00b
Joined: 14 Feb 2003 Posts: 2 Location: Germany
|
Posted: Mon Jan 30, 2006 7:05 pm Post subject: |
|
|
Hello Vitaly,
I run chgrp cron /etc/crontab as root-user and I can at least run crontab -e as non-root. But when the system is going to safe the settings,
the following error occures:
Code: | test@server ~ $ crontab -e
no crontab for test - using an empty one
crontab: installing new crontab
crontabs/tmp.XXXXn63wy2: Permission denied
crontab: edits left in /tmp/crontab.XXXX9SBz9e
|
I compiled everything with hardened use-flags as I am going to use a hardened kernel (i did not yet activate the security settings in my
current kernel - which is by the way linux-2.6.14-hardened-r4). My Vixie-Cron version is 4.1-r8
When I try to start user specific crons via /etc/cron I also get permission denied errors. Running those jobs (e.g. .fetchmailrc manually by
the user works fine).
Thank you for any assistance.
Greetings,
J.Fox
ps. I am running a 32-bit gentoo system, although I've got an AMD Opteron CPU _________________ AMD 64 1800+, 512 MB PC-400 CL2, 320 GB HDD, Gentoo with hardened-dev-sources |
|
Back to top |
|
|
|