Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
vixie-cron - cron permission denied [solved]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Wed Aug 03, 2005 11:41 am    Post subject: vixie-cron - cron permission denied [solved] Reply with quote

Hey Folks,

ive got a strange problem. I'm running Gentoo on a virtual server where it has been isntalled and now i can use it as rootserver. It works pretty well but i've got a cron problem.

No matter wether the jobs are in users crontab (crontab -e) or in /etc/cron.[daily|weekly|...]/ by the time when a job should run i get permission denied in syslog and thats it. For example:
Quote:
Aug 3 11:30:01 vtux cron[17384]: Permission denied
Aug 3 11:35:01 vtux cron[17390]: Permission denied

(vtux 's the name of the box)

Anybody any suggestion? I've got a cron-user, a cron group, everything seems allright. I've emerged vixie-cron(vixie-cron-4.1-r7) several times. nothing helped at all... :(
_________________
managing a server running gentoo...


Last edited by Aphex3K on Fri Aug 05, 2005 2:48 pm; edited 2 times in total
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Wed Aug 03, 2005 2:22 pm    Post subject: Reply with quote

anybody?
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
m_sqrd
Guru
Guru


Joined: 18 Jul 2005
Posts: 367

PostPosted: Wed Aug 03, 2005 2:51 pm    Post subject: Reply with quote

what are the permissions on /etc/crontab ?
should be 0600
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Wed Aug 03, 2005 4:34 pm    Post subject: Reply with quote

m_sqrd wrote:
what are the permissions on /etc/crontab ?
should be 0600

Code:
vtux ~ # ls -l /etc/crontab
-rw-------  1 root root 621 Aug  1 08:43 /etc/crontab

It is
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Thu Aug 04, 2005 7:01 am    Post subject: Reply with quote

anything else i could check?
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Thu Aug 04, 2005 7:52 am    Post subject: Reply with quote

Its highly unlikely, but you are running crond as root right?
_________________
/earth: file system full.
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Thu Aug 04, 2005 8:30 am    Post subject: Reply with quote

dev-urandom wrote:
Its highly unlikely, but you are running crond as root right?
Code:
root     19028     1  0 07:06 ?        00:00:00 /usr/sbin/cron

Looks like...
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
dev-urandom
Apprentice
Apprentice


Joined: 24 Jun 2005
Posts: 260
Location: Huh?

PostPosted: Thu Aug 04, 2005 8:36 am    Post subject: Reply with quote

Aphex3K wrote:
dev-urandom wrote:
Its highly unlikely, but you are running crond as root right?
Code:
root     19028     1  0 07:06 ?        00:00:00 /usr/sbin/cron

Looks like...

That is fine. Its running the way it should.

What are the settings in /etc/pam.d/cron ?

I hope there is no line
Code:

account sufficient pam_deny.so
auth sufficient pam_deny.so


Better still, can you post the output of the file here?

Also what are the directory/file settings inside /var/spool/cron ?
You haven't used chattr here have you?
_________________
/earth: file system full.
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Thu Aug 04, 2005 9:10 am    Post subject: Reply with quote

Code:
vtux ~ # cat /etc/pam.d/cron
#%PAM-1.0

account required        pam_unix.so

auth    required        pam_unix.so

session required        pam_limits.so
Code:
vtux ~ # ls -l /var/spool/cron/
total 8
drwxr-x---  2 root cron 4096 Aug  2 21:30 crontabs
drwxr-x---  2 root cron 4096 Aug  2 16:17 lastrun
vtux ~ # ls -l /var/spool/cron/*
/var/spool/cron/crontabs:
total 8
-rw-------  1 root root 1450 Jul 31 19:49 mailman
-rw-------  1 root root  505 Aug  2 21:30 root

/var/spool/cron/lastrun:
total 0
-rw-r--r--  1 root root 0 Aug  2 16:17 cron.daily
-rw-r--r--  1 root root 0 Aug  2 16:17 cron.hourly
-rw-r--r--  1 root root 0 Aug  2 16:17 cron.monthly
-rw-r--r--  1 root root 0 Aug  2 16:17 cron.weekly

chattr? Not that i know of. I might have used chmod or chown in a humbly strike to solve the problem on my own...
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Fri Aug 05, 2005 6:33 am    Post subject: Reply with quote

Is it wrong or right? Should the cron user/group be involved somewhere there?
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Aug 05, 2005 10:01 am    Post subject: Reply with quote

I use vixie-cron and can't see any difference between your set-up and mine. Can you clarify whether this affects all crontabs? Or does it work for root and fail for users??

T
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Fri Aug 05, 2005 11:15 am    Post subject: Reply with quote

It fails for root at least and i didnt try another user...
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Aug 05, 2005 11:51 am    Post subject: Reply with quote

Code:
denzil2 ~ # ls -la /etc/crontab
-rw-r--r--  1 root root 616 Jul 25 17:24 /etc/crontab


Checked this on a couple of mine and both the same.

I notice your logs don't give the name of the user for the crontab. Mine do, but I can't find anything to help solve.

I'd be tempted to unmerge, nuke every file and directory for Cron and start again.
Back to top
View user's profile Send private message
Aphex3K
Apprentice
Apprentice


Joined: 18 Nov 2003
Posts: 182
Location: Germany

PostPosted: Fri Aug 05, 2005 2:47 pm    Post subject: Reply with quote

Code:
# /etc/init.d/vixie-cron stop
   ...
# rc-update del vixie-cron
   ...
# userdel cron
# groupdel cron
# rm -r /etc/cron*
# rm -r /var/spool/cron*
# groupadd cron
# useradd -g cron cron
# emerge vixie-cron
   ...
# rc-update add vixie-cron default
   ...
# /etc/init.d/vixie-cron start
   ...
That seems to do the trick...
_________________
managing a server running gentoo...
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Fri Aug 05, 2005 2:58 pm    Post subject: Reply with quote

It's a bit of a sledgehammer approach but there was no clear trace of anything wrong, it just didn't work. Glad it worked out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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