Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.

Bug 1200857

Summary: SELinux is preventing rpc.statd from 'write' accesses on the file rpc.statd.pid.
Product: [Fedora] Fedora Reporter: Frederik <allyouneedis>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED NOTABUG QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 22CC: adalan, dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:1e4c1fc0a81a01c2f7f2e3072df07df7067e859c24de5642cabb7c0fe3bc30f7
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-11 15:28:10 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 Frederik 2015-03-11 14:13:12 UTC
Description of problem:
tried to mount an nfs share like this:
sudo mount -t nfs nas:/data/ ~/nas/
SELinux is preventing rpc.statd from 'write' accesses on the file rpc.statd.pid.

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

If you believe that rpc.statd should be allowed write access on the rpc.statd.pid 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:
# grep rpc.statd /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:rpcd_t:s0
Target Context                unconfined_u:object_r:var_run_t:s0
Target Objects                rpc.statd.pid [ file ]
Source                        rpc.statd
Source Path                   rpc.statd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-116.fc22.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.0.0-0.rc2.git0.1.fc22.x86_64 #1
                              SMP Tue Mar 3 21:24:17 UTC 2015 x86_64 x86_64
Alert Count                   1
First Seen                    2015-03-11 15:10:28 CET
Last Seen                     2015-03-11 15:10:28 CET
Local ID                      fdd59843-44d4-43de-8fc4-e7e25608aad4

Raw Audit Messages
type=AVC msg=audit(1426083028.493:843): avc:  denied  { write } for  pid=7101 comm="rpc.statd" name="rpc.statd.pid" dev="tmpfs" ino=102698 scontext=system_u:system_r:rpcd_t:s0 tcontext=unconfined_u:object_r:var_run_t:s0 tclass=file permissive=0


Hash: rpc.statd,rpcd_t,var_run_t,file,write

Version-Release number of selected component:
selinux-policy-3.13.1-116.fc22.noarch

Additional info:
reporter:       libreport-2.4.0
hashmarkername: setroubleshoot
kernel:         4.0.0-0.rc2.git0.1.fc22.x86_64
type:           libreport

Potential duplicate: bug 750103

Comment 1 Lukas Vrabec 2015-03-11 15:28:10 UTC
Have you ever started rpcd directly?

# restorecon -R -v /var/run/rpc*

Should fix your issue. If I am wrong, please reopen the bug. Thank you.

Comment 2 adalan 2015-06-12 21:48:38 UTC
I'm having this exact same issue. Fresh install of server and the above doesn't solve it.

Comment 3 Miroslav Grepl 2015-06-17 15:56:28 UTC
(In reply to adalan from comment #2)
> I'm having this exact same issue. Fresh install of server and the above
> doesn't solve it.

What AVC are you getting?

Comment 4 Red Hat Bugzilla 2023-09-12 00:44:37 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days