Red Hat Bugzilla – Bug 866761
SELinux is preventing /usr/sbin/smbd from 'getattr' accesses on the file /var/public/test.file.
Last modified: 2012-10-16 12:10:08 EDT
Description of problem:
I am trying to configure SAMBA on Fedora 17. I have created this in the smb.conf
comment = My Samba Share
path = /var/public
read only = no
; browseable = yes
guest ok = yes
and created a directory /var/public and chmod 777 to it.
I then used Nautilus to connect to the Windows Share. It reports that SELinux has detected a problem.
libreport version: 2.0.14
Created attachment 627949 [details]
Created attachment 627950 [details]
I tried creating an empty document in the samba share, but it fails because it tells me access denied.
Either you will need to setup proper labeling or you will need to turn on a boolean.
What AVC are you getting?
# semanage fcontext -a -t samba_share_t "/var/public(/.*)?"
# restorecon -R -v /var/public
Then it will work fine for you. You have to tell SELinux that this is samba data in this directory.
Ok, that seems to fix it. I will need to test with a Windows machine mounting the Linux share, but my guess is that will work as well. What is creating the file test.file? Can I delete it? It is zero length.
Nothing to do with SELinux.
Miroslav we need some improvement on
man samba_selinux and man smbd_selinux
samba_share_t needs to be called out more.