Bug 1471295 - SELinux is preventing BackupPC_Admin from 'write' accesses on the file LOCK.
SELinux is preventing BackupPC_Admin from 'write' accesses on the file LOCK.
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
26
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Lukas Vrabec
Fedora Extras Quality Assurance
abrt_hash:258521914cc3f1653866aaffc02...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-07-14 18:59 EDT by Chris Jones
Modified: 2018-04-22 18:00 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-20 10:06:12 EDT
Type: ---
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 Chris Jones 2017-07-14 18:59:20 EDT
Description of problem:
Reported in SELinux troubleshooter
SELinux is preventing BackupPC_Admin from 'write' accesses on the file LOCK.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that BackupPC_Admin should be allowed write access on the LOCK file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'BackupPC_Admin' --raw | audit2allow -M my-BackupPCAdmin
# semodule -X 300 -i my-BackupPCAdmin.pp

Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                LOCK [ file ]
Source                        BackupPC_Admin
Source Path                   BackupPC_Admin
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-259.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.11.9-300.fc26.x86_64 #1 SMP Wed
                              Jul 5 16:21:56 UTC 2017 x86_64 x86_64
Alert Count                   2
First Seen                    2017-07-14 23:53:20 BST
Last Seen                     2017-07-14 23:53:20 BST
Local ID                      edbbe55f-bde7-4237-bc90-778700099ec5

Raw Audit Messages
type=AVC msg=audit(1500072800.753:10477): avc:  denied  { write } for  pid=13101 comm="BackupPC_Admin" name="LOCK" dev="dm-0" ino=2752747 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: BackupPC_Admin,httpd_t,var_lib_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-259.fc26.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.11.9-300.fc26.x86_64
type:           libreport
Comment 1 Joel Uckelman 2018-03-14 12:32:04 EDT
This still happens on Fedora 27:

selinux-policy-3.13.1-283.26.fc27.noarch
BackupPC-4.1.5-1.fc27.x86_64
Comment 2 Lukas Vrabec 2018-03-23 07:44:43 EDT
Chris, 

Any idea why BackupPC runs under httpd_t domains?
Comment 3 Chris Jones 2018-03-23 07:59:29 EDT
Lukas

I have no idea. I just raised the issue in July 2017. Apparently, it still happens, but I have not had the problem now for some months.
Comment 4 Lukas Vrabec 2018-03-23 08:40:36 EDT
So could I close it?
Comment 5 Chris Jones 2018-04-16 07:57:53 EDT
Lukas

Perhaps you should ask Joel Uckelman whether he still has the issue.
Comment 6 Joel Uckelman 2018-04-22 18:00:22 EDT
Yes, this still occurs:

SELinux is preventing BackupPC_Admin from write access on the file LOCK.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that BackupPC_Admin should be allowed write access on the LOCK file by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c 'BackupPC_Admin' --raw | audit2allow -M my-BackupPCAdmin
# semodule -X 300 -i my-BackupPCAdmin.pp


Additional Information:
Source Context                system_u:system_r:httpd_t:s0
Target Context                system_u:object_r:var_lib_t:s0
Target Objects                LOCK [ file ]
Source                        BackupPC_Admin
Source Path                   BackupPC_Admin
Port                          <Unknown>
Host                          <Unknown>
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-283.30.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     clio
Platform                      Linux clio 4.15.16-300.fc27.x86_64 #1 SMP Mon Apr
                              9 17:50:06 UTC 2018 x86_64 x86_64
Alert Count                   515
First Seen                    2018-04-16 11:46:50 BST
Last Seen                     2018-04-22 22:35:33 BST
Local ID                      6f6d5938-07ec-492a-a586-7f70bc91a80d

Raw Audit Messages
type=AVC msg=audit(1524432933.903:384): avc:  denied  { write } for  pid=6665 comm="BackupPC_Admin" name="LOCK" dev="dm-1" ino=223747217 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:var_lib_t:s0 tclass=file permissive=0


Hash: BackupPC_Admin,httpd_t,var_lib_t,file,write

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