Bug 843825 - SELinux is preventing /usr/sbin/smbd from 'create' accesses on the file ._silver-bullet_109add45e522.sparsebundle.
SELinux is preventing /usr/sbin/smbd from 'create' accesses on the file ._sil...
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins (Show other bugs)
17
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:c619c1cef377c5a416d942a3aad...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-07-27 09:05 EDT by long
Modified: 2013-07-04 02:56 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-04 02:56:39 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description long 2012-07-27 09:05:09 EDT
libreport version: 2.0.10
executable:     /usr/bin/python2.7
hashmarkername: setroubleshoot
kernel:         3.4.3-1.fc17.x86_64
time:           Fri 27 Jul 2012 08:03:58 AM CDT

description:
:SELinux is preventing /usr/sbin/smbd from 'create' accesses on the file ._silver-bullet_109add45e522.sparsebundle.
:
:*****  Plugin samba_share (89.9 confidence) suggests  ************************
:
:If you want to allow smbd to have create access on the ._silver-bullet_109add45e522.sparsebundle file
:Then you need to change the label on '._silver-bullet_109add45e522.sparsebundle'
:Do
:# semanage fcontext -a -t samba_share_t '._silver-bullet_109add45e522.sparsebundle'
:# restorecon  -v '._silver-bullet_109add45e522.sparsebundle'
:
:*****  Plugin catchall_labels (9.27 confidence) suggests  ********************
:
:If you want to allow smbd to have create access on the ._silver-bullet_109add45e522.sparsebundle file
:Then you need to change the label on ._silver-bullet_109add45e522.sparsebundle
:Do
:# semanage fcontext -a -t FILE_TYPE '._silver-bullet_109add45e522.sparsebundle'
:where FILE_TYPE is one of the following: pcscd_var_run_t, smbd_var_run_t, auth_cache_t, samba_share_t, smbd_tmp_t, samba_secrets_t, samba_var_t, samba_log_t, ctdbd_var_lib_t, root_t. 
:Then execute: 
:restorecon -v '._silver-bullet_109add45e522.sparsebundle'
:
:
:*****  Plugin catchall (2.25 confidence) suggests  ***************************
:
:If you believe that smbd should be allowed create access on the ._silver-bullet_109add45e522.sparsebundle 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 smbd /var/log/audit/audit.log | audit2allow -M mypol
:# semodule -i mypol.pp
:
:Additional Information:
:Source Context                system_u:system_r:smbd_t:s0
:Target Context                system_u:object_r:var_t:s0
:Target Objects                ._silver-bullet_109add45e522.sparsebundle [ file ]
:Source                        smbd
:Source Path                   /usr/sbin/smbd
:Port                          <Unknown>
:Host                          (removed)
:Source RPM Packages           samba-3.6.6-91.fc17.1.x86_64
:Target RPM Packages           
:Policy RPM                    selinux-policy-3.10.0-140.fc17.noarch
:Selinux Enabled               True
:Policy Type                   targeted
:Enforcing Mode                Enforcing
:Host Name                     (removed)
:Platform                      Linux (removed) 3.4.3-1.fc17.x86_64 #1
:                              SMP Mon Jun 18 19:53:17 UTC 2012 x86_64 x86_64
:Alert Count                   5
:First Seen                    Thu 26 Jul 2012 08:06:28 PM CDT
:Last Seen                     Thu 26 Jul 2012 08:17:16 PM CDT
:Local ID                      1fc05385-332c-4cb8-9100-9428ead8db9a
:
:Raw Audit Messages
:type=AVC msg=audit(1343351836.58:1157): avc:  denied  { create } for  pid=13763 comm="smbd" name="._silver-bullet_109add45e522.sparsebundle" scontext=system_u:system_r:smbd_t:s0 tcontext=system_u:object_r:var_t:s0 tclass=file
:
:
:type=SYSCALL msg=audit(1343351836.58:1157): arch=x86_64 syscall=open success=no exit=EACCES a0=7f42f27935c0 a1=c1 a2=1e4 a3=c1 items=0 ppid=13433 pid=13763 auid=4294967295 uid=0 gid=0 euid=1000 suid=1000 fsuid=1000 egid=1000 sgid=1000 fsgid=1000 tty=(none) ses=4294967295 comm=smbd exe=/usr/sbin/smbd subj=system_u:system_r:smbd_t:s0 key=(null)
:
:Hash: smbd,smbd_t,var_t,file,create
:
:audit2allowunable to open /sys/fs/selinux/policy:  Permission denied
:
:
:audit2allow -Runable to open /sys/fs/selinux/policy:  Permission denied
:
:
Comment 1 Daniel Walsh 2012-07-27 09:27:19 EDT
Looks like you are sharing content under /var via Samba and you need to set the label correctly.

man samba_selinux
Comment 2 long 2012-07-27 13:36:25 EDT
Thanks for the man page tip.  I will go back and check out the labeling but I'm wondering why the troubleshooter didn't point me to the man page (at least I don't recall seeing it there)?  Is that not possible?
Comment 3 long 2012-07-27 13:39:39 EDT
and another question about the troubleshooter, it doesn't appear to be suggesting anywhere that I need to change the label on the directory that samba is trying to write to (at least I assume that is what needs to be done since I don't see a ._silver-bullet_109add45e522.sparsebundle anywhere)

or am I just completely misunderstanding selinux?
Comment 4 Miroslav Grepl 2012-07-30 06:21:58 EDT
We have some case when setroubleshoot point you to a man page. I think we could add it also for other cases.
Comment 5 Daniel Walsh 2012-07-31 11:29:20 EDT
Maybe we should add a mechanism to view the man page from setroubleshoot.
Comment 6 Miroslav Grepl 2012-08-01 04:48:59 EDT
Sounds good.
Comment 7 Miroslav Grepl 2012-08-01 09:26:54 EDT
How about add a new button next to the "Details" button and make this button active if a man page exists?
Comment 8 long 2012-08-02 10:20:56 EDT
Not sure if you were asking Daniel or me but that sounds reasonable to me.
Comment 9 Daniel Walsh 2012-08-02 16:10:53 EDT
long, he is talking to me.  :^) About adding a gui option to setroubleshoot browser to allow users to know there is a lot more info about the confined service that is having trouble in a man page.
Comment 10 Fedora End Of Life 2013-07-04 02:17:14 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

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