Centos – How to write to Samba folder

centossambaserver-message-block

I created a Samba share on my CentOS machine and I can connect to the share and read the contents but I cannot write files to it or delete them.

In Samba I have set readable to yes and writeable to yes, as well as made the folder I want to access apart of the wheel group of which I added the user that is accessing it from Samba.

The folder in quesiton is /var/www/. I have set that folder and all folders under it to the wheel group which can read and write to it.

What am I doing wrong here?

Best Answer

For a folder in Samba to be writable ALL the following have to be true:

  • Share must be configured in Samba to be writeable
  • User must exist in Samba password database (did you copy your UNIX users to Samba users using mksmbpasswd?)
  • User must appear in list of allowed users
  • The specific subnet that the user is accessing from must appear in the list of allowed networks (i.e. if the user's IP is 192.168.2.8/24, the allowed network must be 192.168.2)
  • The backing directory of the share must have appropriate permissions (i.e. be owned by the UNIX user:group that the Samba user maps to and/or the chmod must be high enough)