Bug 512035
Summary: | Selinux denial for httpd access to BackupPC log file. | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Richard Shaw <hobbes1069> |
Component: | BackupPC | Assignee: | Johan Cwiklinski <fedora> |
Status: | CLOSED ERRATA | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 11 | CC: | dwalsh, fedora, jkubin, mgrepl, uckelman |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | 3.1.0-5.fc10 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-10-14 01:32:59 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Richard Shaw
2009-07-16 01:15:45 UTC
Why is a perl script in a log directory? You can change the context on this file to bin_t and it will work but the location of this file has got to change. chcon -t bin_t /var/log/BackupPC/UserEmailInfo.pl If you installed this from a package, what package? I'm not at home right now so I can't give you the exact package but I installed the official Fedora package... Is there some additional info I can provide? I also noticed the following files in /var/log/BackupPC: -r--r--r--. 1 backuppc backuppc 4 2009-08-11 21:58 BackupPC.pid srwxr-x---. 1 backuppc backuppc 0 2009-08-11 21:58 BackupPC.sock -rw-r-----. 1 backuppc backuppc 0 2009-06-17 22:20 LOCK -rw-r-----. 1 backuppc backuppc 2309 2009-08-21 22:00 LOG -rw-r-----. 1 backuppc backuppc 636 2009-08-21 01:00 LOG.0.z -rw-r-----. 1 backuppc backuppc 639 2009-08-11 01:00 LOG.10.z -rw-r-----. 1 backuppc backuppc 637 2009-08-10 01:00 LOG.11.z -rw-r-----. 1 backuppc backuppc 639 2009-08-09 01:00 LOG.12.z -rw-r-----. 1 backuppc backuppc 741 2009-08-08 01:00 LOG.13.z -rw-r-----. 1 backuppc backuppc 640 2009-08-20 01:00 LOG.1.z -rw-r-----. 1 backuppc backuppc 638 2009-08-19 01:00 LOG.2.z -rw-r-----. 1 backuppc backuppc 634 2009-08-18 01:00 LOG.3.z -rw-r-----. 1 backuppc backuppc 635 2009-08-17 01:00 LOG.4.z -rw-r-----. 1 backuppc backuppc 639 2009-08-16 01:00 LOG.5.z -rw-r-----. 1 backuppc backuppc 654 2009-08-15 01:00 LOG.6.z -rw-r-----. 1 backuppc backuppc 639 2009-08-14 01:00 LOG.7.z -rw-r-----. 1 backuppc backuppc 642 2009-08-13 01:00 LOG.8.z -rw-r-----. 1 backuppc backuppc 724 2009-08-12 01:00 LOG.9.z -rw-r-----. 1 backuppc backuppc 12464 2009-08-21 22:00 status.pl -rw-r-----. 1 backuppc backuppc 12464 2009-08-21 21:00 status.pl.old -rw-r-----. 1 backuppc backuppc 196 2009-08-21 01:00 UserEmailInfo.pl Why does apache want to look at this file? Does it want to execute it? You can label this directory httpd_sys_content_t and apache will be able to read it. But this will cause other problems. Or you can add a rule to allow apache to read the content using audit2allow. But that will allow apache to read /var/log/messages. (In reply to comment #4) > Why does apache want to look at this file? Does it want to execute it? I don't have all the answers but I assume apache wants access to the files because the BackupPC interface is completely web driven. I assumed the fault was with why BackupPC wants those files in the /var/log directory. BackupPC's web interface gives user possibility of reading several logs files, including UserEmailInfo.pl (it is indeed a simple log file). That's why these should be labelled 'httpd_sys_content_t', you should use : # semanage fcontext -a -t httpd_sys_content_t /var/log/BackupPC/UserEmailInfo.pl The BackupPC.fc file should look like /etc/BackupPC(/.*)? gen_context(system_u:object_r:httpd_sys_content_t,s0) /etc/BackupPC/pc(/.*)? gen_context(system_u:object_r:httpd_sys_content_rw_t,s0) /var/log/BackupPC(/.*)? gen_context(system_u:object_r:httpd_sys_content_t,s0) Which will set the default labeling for the directory and all subdirs to the correct label. Then Restorecon will label the files correctly. I've missed the regular expression in the .fc file embedded in the package :/ Thanks Daniel for the correct rules, I'll do some tests and push an update very soon. *** Bug 456387 has been marked as a duplicate of this bug. *** BackupPC-3.1.0-6.fc11 has been submitted as an update for Fedora 11. http://admin.fedoraproject.org/updates/BackupPC-3.1.0-6.fc11 BackupPC-3.1.0-5.fc10 has been submitted as an update for Fedora 10. http://admin.fedoraproject.org/updates/BackupPC-3.1.0-5.fc10 BackupPC-3.1.0-5.fc10 has been pushed to the Fedora 10 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update BackupPC'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F10/FEDORA-2009-9800 BackupPC-3.1.0-6.fc11 has been pushed to the Fedora 11 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update BackupPC'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F11/FEDORA-2009-9893 BackupPC-3.1.0-6.fc11 has been pushed to the Fedora 11 stable repository. If problems still persist, please make note of it in this bug report. BackupPC-3.1.0-5.fc10 has been pushed to the Fedora 10 stable repository. If problems still persist, please make note of it in this bug report. |