Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Running samba 3.5 on Red Hat Enterprise 6.1 I'm having issues sharing two folders. Here is the output of testparm:

    workgroup = DOMAINNAME
    server string = Samba Server Version %v
    interfaces = lo, eth1
    bind interfaces only = Yes
    map to guest = Bad User
    log file = /var/log/samba/log.%m
    max log size = 50
    idmap uid = 16777216-33554431
    idmap gid = 16777216-33554431
    hosts allow =,,,,
    hosts deny =
    cups options = raw

    comment = test folder
    path = /usr/local/samba
    valid users = claudio
    write list = claudio
    force user = claudio
    read only = No
    create mask = 0775
    directory mask = 0775

    comment = another test
    path = /home/claudio/tst
    valid users = claudio
    write list = claudio
    force user = claudio
    read only = No
    create mask = 0775

From the Windows XP machine I'm connecting from I'm able to read test but not write, while for test2 I can't even access the folder (though I can see it listed).

ls -l /usr/local
drwxrwxrwx. 2 claudio claudio 4096 Dec  3 10:39 samba

ls -l /user/local/samba
total 32
-rwxrwxrwx. 1 claudio claudio    9 Nov 29 16:26 asd.txt
-rwxrwxrwx. 1 claudio claudio  728 Dec  3 10:16 out.txt

ls -l /home/claudio/
drwxrwxr-x.  2 claudio claudio       4096 Dec  3 09:57 tst

ls -l /home/claudio/tst
total 4
-rw-rw-r--. 1 claudio claudio 4 Dec  3 09:57 asd.txt

Any suggestion?

share|improve this question
Interestingly, I had to do both read only = no and writeable = yes, even though they appear synonymous. But I deleted the answer since you didn't think it would help. But I was doing this last night and thought the same thing - which in my case that fixed it. – nerdwaller Dec 3 '12 at 15:21

Red Hat Enterprise comes with SELinux enabled by default, which provides an implementation of the mandatory access control mechanism (as you can read from the guide).

That means shared files/folders need to be labeled with the proper type in order to allow smbd to share them correctly (you can check it adding the option Z to the ls command). This is achieved through the command

chcon -t samba_share_t /path

which allow to write on the share (add the option -R to flag recursively).

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .