LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 05-16-2008, 06:53 PM   #1
kngspook
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo, Ubuntu, or whatever is at hand.
Posts: 4

Rep: Reputation: 0
Question non-root crontab failure (permissions issue?)


I'm having trouble getting cron to be usable by normal users.

I'm running vixie-cron 4.1-r10 on Gentoo Linux. My user is a member of both cron and crontab groups (being unsure which I needed, but speculating the former). There is no cron.allow, and an empty cron.deny file in /etc.

Every time I try "crontab -e" as my user, I get this:
Code:
crontab -e
crontab: installing new crontab
chown: Operation not permitted
crontab: edits left in /tmp/crontab.XXXXWvhnLp
Naturally, I'm guessing permissions problems. Here are the permissions:
Code:
host2 spool # cd /var/spool
host2 spool # ls -alR cron/
cron/:
total 16
drwxr-x--- 4 root cron    4096 Mar  6 17:16 .
drwxr-xr-x 6 root root    4096 Apr 13 16:02 ..
-rw-r--r-- 1 root root       0 Mar  6 17:16 .keep_sys-process_cronbase-0
drwx-wx--T 2 root crontab 4096 May 16 14:39 crontabs
drwxr-x--- 2 root root    4096 Mar  6 17:16 lastrun

cron/crontabs:
total 12
drwx-wx--T 2 root crontab 4096 May 16 14:39 .
drwxr-x--- 4 root cron    4096 Mar  6 17:16 ..
-rw-r--r-- 1 root crontab    0 Mar  6 17:16 .keep_sys-process_vixie-cron-0
-rw------- 1 root crontab  328 Apr 27 12:25 root

cron/lastrun:
total 8
drwxr-x--- 2 root root 4096 Mar  6 17:16 .
drwxr-x--- 4 root cron 4096 Mar  6 17:16 ..
-rw-r--r-- 1 root root    0 Mar  6 17:16 .keep_sys-process_cronbase-0
host2 spool #
"crontab -e" does not error out when run as root.
"crontab -u myuser -e", when run as root, does create a crontab, which appears to be owned by root, grouped by root, and with rw permissions for owner only.

How can I fix this?
Thanks.
 
Old 05-16-2008, 07:03 PM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Permissions on CentOS in /var/spool

drwx------ 2 root root 4096 Apr 13 15:00 cron

Each file within is user:root

Hope that helps somewhat
 
Old 05-16-2008, 07:27 PM   #3
kngspook
LQ Newbie
 
Registered: Apr 2008
Distribution: Gentoo, Ubuntu, or whatever is at hand.
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by billymayday View Post
Each file within is user:root
Even those for crontabs belonging to non-root users?
 
Old 05-17-2008, 12:28 AM   #4
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Yep - all of them. Root's is root:root, mine is myusername:root
 
  


Reply

Tags
crontab, failure, permissions


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
exec(), crontab and web permissions va1damar Linux - Newbie 1 02-21-2007 04:55 PM
crontab & process permissions JJX Linux - General 6 05-06-2006 11:26 AM
Permissions issue on hda1 as root Chivas3 Linux - Security 3 09-24-2005 09:00 PM
crontab failure: permission denied trying to run script hedpe Linux - Software 5 05-03-2005 07:07 PM
I'm confused - Crontab and Access Permissions Newman_SCO Linux - Newbie 5 09-03-2003 08:28 PM


All times are GMT -5. The time now is 04:17 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration