Bug 1938573

Summary: SELinux is preventing chgrp from using the 'fowner' capabilities.
Product: [Fedora] Fedora Reporter: Mikhail <mikhail.v.gavrilov>
Component: selinux-policyAssignee: Zdenek Pytela <zpytela>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dwalsh, grepl.miroslav, lvrabec, mmalik, omosnace, plautrba, vmojzis, zpytela
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4eb77f9a9db568c0fcc747b21550754cb803fb4267c0426f24590795a0f29c38;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2021-03-16 19:24:43 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 Mikhail 2021-03-14 16:36:18 UTC
Description of problem:
SELinux is preventing chgrp from using the 'fowner' capabilities.

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

If you believe that chgrp should have the fowner capability 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 'chgrp' --raw | audit2allow -M my-chgrp
# semodule -X 300 -i my-chgrp.pp

Additional Information:
Source Context                system_u:system_r:sshd_keygen_t:s0
Target Context                system_u:system_r:sshd_keygen_t:s0
Target Objects                Unknown [ capability ]
Source                        chgrp
Source Path                   chgrp
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
SELinux Policy RPM            selinux-policy-targeted-3.14.8-6.fc35.noarch
Local Policy RPM              selinux-policy-targeted-3.14.8-6.fc35.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.12.0-0.rc2.20210309git144c79ef33
                              53.166.fc35.x86_64 #1 SMP Tue Mar 9 19:42:08 UTC
                              2021 x86_64 x86_64
Alert Count                   2
First Seen                    2021-03-14 21:32:48 +05
Last Seen                     2021-03-14 21:32:48 +05
Local ID                      fabe3056-ac48-452c-af5e-8c1ecd1da5ce

Raw Audit Messages
type=AVC msg=audit(1615739568.761:182): avc:  denied  { fowner } for  pid=1285 comm="chgrp" capability=3  scontext=system_u:system_r:sshd_keygen_t:s0 tcontext=system_u:system_r:sshd_keygen_t:s0 tclass=capability permissive=1


Hash: chgrp,sshd_keygen_t,sshd_keygen_t,capability,fowner

Version-Release number of selected component:
selinux-policy-targeted-3.14.8-6.fc35.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.14.0
hashmarkername: setroubleshoot
kernel:         5.12.0-0.rc2.20210309git144c79ef3353.166.fc35.x86_64
type:           libreport

Comment 1 Zdenek Pytela 2021-03-16 19:24:43 UTC

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