Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Have you restarted samba since adding the user in question to the wheel group? –  MadHatter Nov 6 '10 at 6:51
    
Yes, does it matter if SELInux is on and its the var/www/html directory? –  Darren Nov 9 '10 at 16:14

1 Answer 1

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)
share|improve this answer
1  
What about SELinux domains? It should be set to public_content_rw_t fedoraproject.org/wiki/SELinux/samba –  sumar Dec 27 '10 at 11:37

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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