Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
crontab permission denied
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
dhopp
n00b
n00b


Joined: 02 Jan 2003
Posts: 3

PostPosted: Thu Jan 02, 2003 8:43 pm    Post subject: crontab permission denied Reply with quote

I have vcron 3.0.1-rc1 installed. I'm trying to submit a job as a normal user but I get the following error:

Code:

dhopp@dhopp dhopp $ crontab work.job
-bash: /usr/bin/crontab: Permission denied


I have added the user to the cron group and even created the /etc/cron.allow file and added the user to that and I still get the same error.

Any ideas?
Back to top
View user's profile Send private message
m.mascherpa
Bodhisattva
Bodhisattva


Joined: 22 May 2002
Posts: 139
Location: italy

PostPosted: Fri Jan 03, 2003 12:32 am    Post subject: Reply with quote

is the crontab executable suid?
_________________
mush keeps the dream alive
Back to top
View user's profile Send private message
dhopp
n00b
n00b


Joined: 02 Jan 2003
Posts: 3

PostPosted: Fri Jan 03, 2003 5:01 pm    Post subject: Reply with quote

I tried:

Code:

chmod 4750 /usr/bin/crontab
ls -l /usr/bin/crontab
-rwsr-x---  1  root   cron      21276    Jan 2 15:30   /usr/bin/crontab


But normal users still get "permission denied". I thought mode 4000 was the mode for setuid but I could be wrong....
Back to top
View user's profile Send private message
jukka
Apprentice
Apprentice


Joined: 06 Jun 2002
Posts: 249
Location: Zurich, Switzerland

PostPosted: Fri Jan 03, 2003 5:23 pm    Post subject: Reply with quote

dhopp wrote:
I tried [...] But normal users still get "permission denied".

what does a
Code:
$ file /usr/bin/crontab
say? (if the file is not a compiled executable, suid is ignored by the kernel) hmm, but 21276 bytes is rather a compiled exe. already tried strace(1)?

Quote:
I thought mode 4000 was the mode for setuid but I could be wrong....

mode 4000 is suid set, but user execute not set, what doesn't make any sense... at least exe and read has to be set for programs.
Back to top
View user's profile Send private message
Naan Yaar
Bodhisattva
Bodhisattva


Joined: 27 Jun 2002
Posts: 1549

PostPosted: Fri Jan 03, 2003 6:11 pm    Post subject: Reply with quote

crontab is group rx here. So setuid without "other" rx is OK.

dhopp: are you sure the user is in the cron group? Did you login again after adding yourself to the cron group or do "newgrp cron" to make sure that the change "gets noticed"?
jukka wrote:
...
mode 4000 is suid set, but user execute not set, what doesn't make any sense... at least exe and read has to be set for programs.
Back to top
View user's profile Send private message
dhopp
n00b
n00b


Joined: 02 Jan 2003
Posts: 3

PostPosted: Fri Jan 03, 2003 6:18 pm    Post subject: Reply with quote

argh!

I didn't do newgrp cron. It works now...

Thanks!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum