I have a local webserver that I want to have samba access to. In my smb.conf everything seems to be working except I cannot access the www folder. I have full permissions on it and have tried everything I can think of in my smb.conf config.

workgroup = WORKGROUP
server string = Samba Server %v
netbios name = centos
guest account = nobody
map to guest = bad user
security = user
dns proxy = no
wins support = yes
name resolve order = wins lmhosts host bcast
#============================ Share Definitions ==============================
path = /var
browsable =yes
writable = yes
guest ok = yes
read only = no
path = /var/www
public = yes
writable = yes
comment = smb share
printable = no
guest ok = yes
create mode = 0777
directory mode = 0777

I am able to get into the Webserver share and open folders except www and on the www share it won't open the error is you do not have permissions to access www folder.


This is due to SELINUX. Try putting it in permissive mode, issuing setenforce 0 and test if Samba now works. If it works and you want to refine your configuration, you can tag /var/www with the public_content_rw_t label and re enable selinux with setenforce 1

For more information, see here

  • Dang! I thought I had disabled it prior to all this headache. Thanks for the help. – Andrew Threadgill Jul 22 '15 at 21:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.