-1

I am trying to set up a Samba share with a Windows computer from CentOS6. This is my current samba config:

[global]
restrict anonymous = no
domain master = no
preferred master = no
workgroup = workgroup
ldap ssl = no
server signing = auto
wins support = no

[test]
path = /home/test
browseable = yes
writable = yes
guest ok =  no
create mask = 0777
directory mask = 0777

I can access the directory specified on my Windows computer, but access is denied if I try to create a folder or save a file into it. I have tried this config with many different folders (not just /home/test) with them all having the same result. The directories all belong to the same user that I log into as on the Windows computer and that user also has full privileges of the directory recursively (chmod and chown have been used at times), and so I don't understand why the access is denied.

Thanks.

  • Try adding `security = user` to your `[global]` section. What file system are you using (eg Ext4)? – Chris S Apr 08 '14 at 15:19
  • Side note: Setting masks to 0777 is a security risk, everything written to the server becomes executable. The directory mask should be 0755 or 0775, and the create mask should be 0644 or 0664. – Chris S Apr 08 '14 at 15:25
  • Thanks for your comment. I tried the addition specified in your first comment, but that did not work. I do realize the risk, but I changed them to that in an effort just to get a working system; I will rectify this before I put it into production. The system I am using is Ext4. – user3509923 Apr 08 '14 at 15:33

1 Answers1

-1

execute this

chmod 777 /home/test 

And change your section test in samba config for this:

[test]
path = /home/test
browseable = yes
writable = yes
guest ok = yes
create mask = 0777
directory mask = 0777
security = share
PoLIVoX
  • 195
  • 1
  • 1
  • 6