Bug 1583904 - SELinux is preventing snapd from 'open' accesses on the directory /home/jgiambona/snap.
Summary: SELinux is preventing snapd from 'open' accesses on the directory /home/jgiam...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: snapd
Version: 28
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Zygmunt Krynicki
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:ff7056eda582d4cc96172fbffbc...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-05-30 02:51 UTC by jason.giambona
Modified: 2019-06-05 19:08 UTC (History)
10 users (show)

Fixed In Version: snapd-2.33.1-1.fc27 snapd-2.33.1-1.fc28
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-07-01 22:23:23 UTC


Attachments (Terms of Use)

Description jason.giambona 2018-05-30 02:51:07 UTC
Description of problem:
Installed snapd and receiving errors from selinux
SELinux is preventing snapd from 'open' accesses on the directory /home/jgiambona/snap.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/home/jgiambona/snap default label should be snappy_home_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /home/jgiambona/snap

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that snapd should be allowed open access on the snap 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                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/jgiambona/snap [ dir ]
Source                        snapd
Source Path                   snapd
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.1-24.fc28.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.16.8-300.fc28.x86_64 #1 SMP Wed
                              May 9 20:23:40 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-05-28 16:50:53 +08
Last Seen                     2018-05-28 16:50:53 +08
Local ID                      ffe1c3a4-3a1a-4f87-95d1-71dadbb72612

Raw Audit Messages
type=AVC msg=audit(1527497453.428:492): avc:  denied  { open } for  pid=19608 comm="snapd" path="/home/jgiambona/snap" dev="dm-3" ino=788535 scontext=system_u:system_r:snappy_t:s0 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir permissive=1


Hash: snapd,snappy_t,user_home_t,dir,open

Version-Release number of selected component:
selinux-policy-3.14.1-24.fc28.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.16.8-300.fc28.x86_64
type:           libreport

Potential duplicate: bug 1573019

Comment 1 Fedora Update System 2018-06-23 22:27:17 UTC
snapd-2.33.1-1.fc28 snapd-glib-1.41-1.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-942eec912c

Comment 2 Fedora Update System 2018-06-23 22:27:27 UTC
snapd-2.33.1-1.fc27 snapd-glib-1.41-1.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2018-1330056acb

Comment 3 Fedora Update System 2018-07-01 22:23:23 UTC
snapd-2.33.1-1.fc27, snapd-glib-1.41-1.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.

Comment 4 Fedora Update System 2018-07-01 22:36:20 UTC
snapd-2.33.1-1.fc28, snapd-glib-1.41-1.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.

Comment 5 ep 2018-09-16 22:55:58 UTC
Description of problem:
opening wekan app snapd

Version-Release number of selected component:
selinux-policy-3.14.1-42.fc28.noarch

Additional info:
reporter:       libreport-2.9.5
hashmarkername: setroubleshoot
kernel:         4.18.7-200.fc28.x86_64
type:           libreport

Comment 6 Fernando Romo 2019-06-05 19:08:01 UTC
I update today Fedora 30 with kernel 5.1.6-300.fc30.x86_64 and snapd (2.39-1.fc30) make the system slow and disable the login on lock screen.

removing snapd and the system respond normal again

SELinux is in enforcing mode, y try disabled mode and test again


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