Bug 1301327 - user crontab stopped working
user crontab stopped working
Status: CLOSED DUPLICATE of bug 1298192
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
23
All Linux
unspecified Severity high
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-24 03:34 EST by Laurentiu Pancescu
Modified: 2016-01-24 11:44 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-01-24 11:44:14 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Laurentiu Pancescu 2016-01-24 03:34:24 EST
I only noticed yesterday evening that the automatic remote backups, triggered twice daily via a user crontab, had stopped working after the upgrade from F22 to F23 (performed last weekend).  I found log messages like the following:

Jan 23 19:42:01 localhost.localdomain crond[1111]: (meike) Unauthorized SELinux context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 file_context=unconfined_u:object_r:user_cron_spool_t:s0 (/var/spool/cron/meike)
Jan 23 19:42:01 localhost.localdomain crond[1111]: (meike) FAILED (loading cron table)

Unfortunately, restorecon only displays a warning about missing the default context for that file; I also removed the crontab with "crontab -r" and recreated it with "crontab -e", but this results in the same SELinux context - the backup doesn't run, and I see the same log message mentioning SELinux again.  Does the latest SELinux policy require userspace changes in crontab?
Comment 1 Kim Bisgaard 2016-01-24 05:39:53 EST
I get this too, and I too recently upgraded from :
Jan 24 10:20:37 jukebox crontab[19006]: (mythtv) BEGIN EDIT (mythtv)
Jan 24 10:21:44 jukebox crontab[19006]: (mythtv) REPLACE (mythtv)
Jan 24 10:21:44 jukebox crontab[19006]: (mythtv) END EDIT (mythtv)
Jan 24 10:22:01 jukebox crond[8384]: (root) Unauthorized SELinux context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 file_context=unconfined_u:object_r:user_cron_spool_t:s0 (/var/spool/cron/root)
Jan 24 10:22:01 jukebox crond[8384]: (root) FAILED (loading cron table)
Jan 24 10:22:01 jukebox crond[8384]: (mythtv) Unauthorized SELinux context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 file_context=unconfined_u:object_r:user_cron_spool_t:s0 (/var/spool/cron/mythtv)
Jan 24 10:22:01 jukebox crond[8384]: (mythtv) FAILED (loading cron table)

ls -alZ /var/spool/cron
total 12
drwx------.  2 root   root   system_u:object_r:user_cron_spool_t:s0     4096 jan 24 10:21 .
drwxr-xr-x. 14 root   root   system_u:object_r:var_spool_t:s0           4096 sep 10 10:23 ..
-rw-------.  1 mythtv mythtv unconfined_u:object_r:user_cron_spool_t:s0  127 jan 24 10:21 mythtv
-rw-------.  1 root   root   unconfined_u:object_r:user_cron_spool_t:s0    0 mar 13  2014 root

ls -lZ /usr/sbin/crond
-rwxr-xr-x. 1 root root system_u:object_r:crond_exec_t:s0 70152 jul 13  2015 /usr/sbin/crond
Comment 2 Kim Bisgaard 2016-01-24 06:46:32 EST
rpm -qa cronie selinux-\*
selinux-policy-3.13.1-158.2.fc23.noarch
cronie-1.5.0-3.fc23.x86_64
selinux-policy-targeted-3.13.1-158.2.fc23.noarch
selinux-policy-devel-3.13.1-158.2.fc23.noarch
Comment 3 Petr Lautrbach 2016-01-24 11:44:14 EST
Please update your kernel to kernel-4.3.3-303.fc23 - https://bodhi.fedoraproject.org/updates/FEDORA-2016-b59fd603be

*** This bug has been marked as a duplicate of bug 1298192 ***

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