Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Detailed Description:
SELinux denied access requested by cat. /var/spool/bacula/log may be a
mislabeled. /var/spool/bacula/log default SELinux type is var_log_t, but its
current type is var_spool_t. Changing this file back to the default type, may
fix your problem.
File contexts can be assigned to a file in the following ways.
* Files created in a directory receive the file context of the parent
directory by default.
* The SELinux policy might override the default label inherited from the
parent directory by specifying a process running in context A which creates
a file in a directory labeled B will instead create the file with label C.
An example of this would be the dhcp client running with the dhclient_t type
and creating a file in the directory /etc. This file would normally receive
the etc_t type due to parental inheritance but instead the file is labeled
with the net_conf_t type because the SELinux policy specifies this.
* Users can change the file context on a file using tools such as chcon, or
restorecon.
This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.
However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.
If you believe this is a bug, please file a bug report against this package.
Allowing Access:
You can restore the default system context to this file by executing the
restorecon command. restorecon '/var/spool/bacula/log', if this file is a
directory, you can recursively restore using restorecon -R
'/var/spool/bacula/log'.
Fix Command:
/sbin/restorecon '/var/spool/bacula/log'
Additional Information:
Source Context system_u:system_r:logwatch_t:s0-s0:c0.c1023
Target Context unconfined_u:object_r:var_spool_t:s0
Target Objects /var/spool/bacula/log [ file ]
Source cat
Source Path cat
Port <Unknown>
Host <DELETED>
Source RPM Packages
Target RPM Packages
Policy RPM selinux-policy-3.7.19-93.el6_1.7
Selinux Enabled True
Policy Type targeted
Enforcing Mode Enforcing
Plugin Name restorecon
Host Name <DELETED>
Platform Linux <DELETED>
2.6.32-131.12.1.el6.s390x #1 SMP Sun Jul 31
16:49:40 EDT 2011 s390x s390x
Alert Count 3
First Seen Wed Aug 31 03:23:03 2011
Last Seen Fri Sep 2 03:31:04 2011
Local ID 11b67c1a-08b7-49a6-80ab-ae964c6a2a58
Line Numbers
Raw Audit Messages:
node=<DELETED> type=AVC msg=audit(1314948664.221:71082): avc: denied { read } for pid=37215 comm="cat" name="log" dev=md1 ino=3955388 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=file
You have a mislabeled directory.
restorecon -R -v /var/spool/bacula
Should fix, at somepoint someone should fix bacula to put its log files where they belong under /var/log.
Detailed Description: SELinux denied access requested by cat. /var/spool/bacula/log may be a mislabeled. /var/spool/bacula/log default SELinux type is var_log_t, but its current type is var_spool_t. Changing this file back to the default type, may fix your problem. File contexts can be assigned to a file in the following ways. * Files created in a directory receive the file context of the parent directory by default. * The SELinux policy might override the default label inherited from the parent directory by specifying a process running in context A which creates a file in a directory labeled B will instead create the file with label C. An example of this would be the dhcp client running with the dhclient_t type and creating a file in the directory /etc. This file would normally receive the etc_t type due to parental inheritance but instead the file is labeled with the net_conf_t type because the SELinux policy specifies this. * Users can change the file context on a file using tools such as chcon, or restorecon. This file could have been mislabeled either by user error, or if an normally confined application was run under the wrong domain. However, this might also indicate a bug in SELinux because the file should not have been labeled with this type. If you believe this is a bug, please file a bug report against this package. Allowing Access: You can restore the default system context to this file by executing the restorecon command. restorecon '/var/spool/bacula/log', if this file is a directory, you can recursively restore using restorecon -R '/var/spool/bacula/log'. Fix Command: /sbin/restorecon '/var/spool/bacula/log' Additional Information: Source Context system_u:system_r:logwatch_t:s0-s0:c0.c1023 Target Context unconfined_u:object_r:var_spool_t:s0 Target Objects /var/spool/bacula/log [ file ] Source cat Source Path cat Port <Unknown> Host <DELETED> Source RPM Packages Target RPM Packages Policy RPM selinux-policy-3.7.19-93.el6_1.7 Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Plugin Name restorecon Host Name <DELETED> Platform Linux <DELETED> 2.6.32-131.12.1.el6.s390x #1 SMP Sun Jul 31 16:49:40 EDT 2011 s390x s390x Alert Count 3 First Seen Wed Aug 31 03:23:03 2011 Last Seen Fri Sep 2 03:31:04 2011 Local ID 11b67c1a-08b7-49a6-80ab-ae964c6a2a58 Line Numbers Raw Audit Messages: node=<DELETED> type=AVC msg=audit(1314948664.221:71082): avc: denied { read } for pid=37215 comm="cat" name="log" dev=md1 ino=3955388 scontext=system_u:system_r:logwatch_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:var_spool_t:s0 tclass=file