Bug 1327900 - SELinux is preventing bash from 'write' accesses on the directory logFiles.
Summary: SELinux is preventing bash from 'write' accesses on the directory logFiles.
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 23
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:6549879a032bd3196a651e41c63...
: 1327901 1327902 1327903 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-04-17 17:53 UTC by OoZooL
Modified: 2016-04-18 14:10 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-04-18 14:09:11 UTC
Type: ---


Attachments (Terms of Use)

Description OoZooL 2016-04-17 17:53:09 UTC
Description of problem:
This is probably due to volume manipulation under the root home directory while playing with docker
SELinux is preventing bash from 'write' accesses on the directory logFiles.

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

If you believe that bash should be allowed write access on the logFiles 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 bash --raw | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:svirt_lxc_net_t:s0:c153,c262
Target Context                unconfined_u:object_r:admin_home_t:s0
Target Objects                logFiles [ dir ]
Source                        bash
Source Path                   bash
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-158.12.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.4.6-301.fc23.x86_64+debug #1 SMP
                              Wed Mar 30 16:31:03 UTC 2016 x86_64 x86_64
Alert Count                   1
First Seen                    2016-04-17 20:51:10 IDT
Last Seen                     2016-04-17 20:51:10 IDT
Local ID                      9b753717-28ec-4b14-8c64-f1803d9899c3

Raw Audit Messages
type=AVC msg=audit(1460915470.94:1080): avc:  denied  { write } for  pid=19584 comm="bash" name="logFiles" dev="dm-1" ino=1438997 scontext=system_u:system_r:svirt_lxc_net_t:s0:c153,c262 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=dir permissive=0


Hash: bash,svirt_lxc_net_t,admin_home_t,dir,write

Version-Release number of selected component:
selinux-policy-3.13.1-158.12.fc23.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.4.6-301.fc23.x86_64+debug
type:           libreport

Comment 1 Daniel Walsh 2016-04-18 14:09:11 UTC
If you want to volume mount content into a homedir. You should use :Z or :z when mounting into the homedir.

http://www.projectatomic.io/blog/2015/06/using-volumes-with-docker-can-cause-problems-with-selinux/

Comment 2 Daniel Walsh 2016-04-18 14:09:35 UTC
*** Bug 1327901 has been marked as a duplicate of this bug. ***

Comment 3 Daniel Walsh 2016-04-18 14:09:48 UTC
*** Bug 1327902 has been marked as a duplicate of this bug. ***

Comment 4 Daniel Walsh 2016-04-18 14:10:07 UTC
*** Bug 1327903 has been marked as a duplicate of this bug. ***


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