Bug 1514810 - SELinux is preventing snapd from 'write' accesses on the directory /usr/share/bash-completion/completions.
Summary: SELinux is preventing snapd from 'write' accesses on the directory /usr/share...
Keywords:
Status: CLOSED DUPLICATE of bug 1514800
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 27
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:9893e508cd914bf38b65fe7aa8f...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-18 17:27 UTC by Predrag
Modified: 2017-11-20 12:36 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2017-11-20 12:36:15 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Predrag 2017-11-18 17:27:45 UTC
Description of problem:
SELinux is preventing snapd from 'write' accesses on the directory /usr/share/bash-completion/completions.

*****  Plugin catchall_labels (83.8 confidence) suggests   *******************

If you want to allow snapd to have write access on the completions directory
Then you need to change the label on /usr/share/bash-completion/completions
Do
# semanage fcontext -a -t FILE_TYPE '/usr/share/bash-completion/completions'
where FILE_TYPE is one of the following: snappy_home_t, snappy_var_lib_t, snappy_var_run_t, snappy_var_t, systemd_unit_file_t, tmp_t, udev_rules_t, user_home_dir_t.
Then execute:
restorecon -v '/usr/share/bash-completion/completions'


*****  Plugin catchall (17.1 confidence) suggests   **************************

If you believe that snapd should be allowed write access on the completions directory 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 'snapd' --raw | audit2allow -M my-snapd
# semodule -X 300 -i my-snapd.pp

Additional Information:
Source Context                system_u:system_r:snappy_t:s0
Target Context                system_u:object_r:usr_t:s0
Target Objects                /usr/share/bash-completion/completions [ dir ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    <Unknown>
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.13.12-300.fc27.x86_64 #1 SMP Wed
                              Nov 8 16:38:01 UTC 2017 x86_64 x86_64
Alert Count                   1
First Seen                    2017-11-16 21:51:40 CET
Last Seen                     2017-11-16 21:51:40 CET
Local ID                      0cc24dcf-bb3a-42e3-bbc9-6e3edc630ea5

Raw Audit Messages
type=AVC msg=audit(1510865500.520:3373): avc:  denied  { write } for  pid=2316 comm="snapd" name="completions" dev="dm-1" ino=2628542 scontext=system_u:system_r:snappy_t:s0 tcontext=system_u:object_r:usr_t:s0 tclass=dir permissive=1


Hash: snapd,snappy_t,usr_t,dir,write


Additional info:
component:      selinux-policy
reporter:       libreport-2.9.3
hashmarkername: setroubleshoot
kernel:         4.13.12-300.fc27.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2017-11-20 12:36:15 UTC

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


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