[Samba] Samba on freebsd - permissions issue

James D. Parra jamesp at musicreports.com
Wed Sep 7 17:31:48 MDT 2011


I have Samba set up on FreeBSD with a share for guests. I don't need or want any authentication for this share.

        path = /data/test2
        read only = No
        create mask = 0777
        guest ok = Yes

The file permission on the host directory was set to 2777 and nobody:nobody. When a windows machine writes to the dir the permissions look fine. For example,

-rwxrw-rw- 1 nobody nobody 0 Sep  7 13:38 New Text Document.txt

However, if a Linux machine mounts the share and any user other than root writes to it the perm's are different and you get a permissions error;

$ touch ztest.1.txt
touch: cannot touch `ztest.1.txt': Permission denied

Interestingly, regardless of the error, the file is created;

-rw-r--r-- 1 nobody nobody 0 Sep  7 16:15 ztest.1.txt

If the user opens the file to write to it, it is opened in read-only.

I get the same results when mounting the share from Linux using these two different commands;

 mount -t cifs //bsd-host/test2 /mnt/test2


 mount -t cifs -o file_mode=0777,dir_mode=0777 //bsd-host/test2 /mnt/test2

Any suggestions on how I can fix this? 

Thank you in advance,


More information about the samba mailing list