Bug 170830 - "crontab -l" broken - trying to access nonexistant $HOME/cron/
"crontab -l" broken - trying to access nonexistant $HOME/cron/
Product: Fedora
Classification: Fedora
Component: vixie-cron (Show other bugs)
All Linux
medium Severity high
: ---
: ---
Assigned To: Marcela Mašláňová
Brock Organ
Depends On:
  Show dependency treegraph
Reported: 2005-10-14 14:08 EDT by John Ellson
Modified: 2007-11-30 17:11 EST (History)
0 users

See Also:
Fixed In Version: vixie-cron-4.1-40.FC5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2006-08-28 06:35:06 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description John Ellson 2005-10-14 14:08:59 EDT
Description of problem:
"crontab -l" attempts to access nonexistant $HOME/cron/ directory.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.crontab -l
Actual results:
cron/ellson: Permission denied

Expected results:
distable cron jobs

Additional info:
Reverting to vixie-cron-4.1-36 fixes the problem
Comment 1 Jason Vas Dias 2005-10-14 15:14:49 EDT
Oops, sorry about that - an over-enthusiastic PAM maintainer changed the PAM 
configuration file without any cron testing or checking with me.

I'm now backing out the change until the new PAM is working correctly,
and my new enhanced cron is released next week and I've had time to test.

vixie-cron-4.1-39 is now in Rawhide - it should behave identically to the
vixie-cron-4.1-36 you're already using, so no need to upgrade.
Comment 2 John Ellson 2005-10-15 10:58:01 EDT
vixie-cron-4.1-39 contains the same problem as vixie-cron-4.1-38
Comment 3 Jason Vas Dias 2005-10-18 15:23:31 EDT
Very sorry for the problems and confusion.

The cause of this problem was that the 6755 setuid/setgid mode of 
/usr/bin/crontab was dropped .

It seems that RPM no longer allows implicit setuid/setgid files - 
ie. if you 'chmod 6755 $RPM_BUILD_ROOT/usr/bin/crontab' in the .spec
%install, and then in %files:
the 6755 mode is not maintained - I needed to do
'%attr(6755,root,root) /usr/bin/crontab

/usr/bin/crontab MUST be installed setuid/setgid in order to have permission
to modify the /var/spool directory, which is the cron 'working directory' to
which the 'cron/user' you mention above is relative.

This setuid crontab requirement is likely to disappear in the enhanced cron
version I am working on.

You can workaround this problem by , as root, doing:
# chmod 6755 /usr/bin/crontab

The last modifier of vixie-cron did not notice crontab was no longer installed
setuid and hence would always fail for non-root users - sorry you had to find
this out the hard way.

The new vixie-cron-4.1-40.FC5 that fixes this problem is now submitted and 
will be in tomorrow's rawhide-20051018 .
Comment 4 Marcela Mašláňová 2006-08-28 06:35:06 EDT
It was fixed in 4.1-40.FC5, in devel has to work properly.

Note You need to log in before you can comment on or make changes to this bug.