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?
You're missing:
Also, you really want to use 0666 for force create mask. Probably no good reason to force the execute bits.
Changing permissions to 777 ALWAYS makes me nervous, even if this is a home project. Instead, add all your samba users to a group (like samba_user), then in smb.conf add the line:
Naturally, you must also chgrp all the necessary folders as well. Then you can set finer grained permissions, allow people to do their thing in other people's folders, and your server isn't turned into a free for all. Someone wants to have a private folder? Just change that folder's group from samba_user back to the user's private group.
I'm guessing that this is the permissions in smb.conf being used as a mask along with those specified in the user's profile, the two will get anded together rather than ored so if samba says 777 and the user's mask is 755 then you'll get 755 as a result.
The permission denied message that you see is simply agreeing with the permissions that you are seeing recorded against the files. The extra error message you see I'm not sure about though.