Linux – Samba – Users can’t write to dirs not created by themselves

linuxpermissionssamba

Here's the relevant smb.conf section:

[someshare]
        path = /somewhere
        read only = No
        writeable = Yes
        guest ok = Yes
        create mask = 0777
        security mask = 0777
        directory mask = 0777
        force create mode = 0777
        directory security mask = 0777

Say user1 creates a directory on that share. It's permissions will be: drwxr-xr-x and the owner will be user1.

While user2 can access the directory created by user1, he receives a permission error when trying to create a file on that directory.

To me it seems weird that the permissions of the dir created by user1 aren't 777 as specified in smb.conf…

Edit: I forgot to mention a weird error that pops up in the client log when the permission is denied:

[2009/06/24 03:02:18,  0] smbd/trans2.c:unix_filetype(1130)
  unix_filetype: unknown filetype 0

What am I missing?

Best Answer

You're missing:

force directory mode = 0777

Also, you really want to use 0666 for force create mask. Probably no good reason to force the execute bits.