I have set up a samba shared folder /shared

I have created 2 users Jack and Jill, and they are part of the Developers group. Developers have read write and execute permissions on the /shared directory.

I have executed chmod g+rws /shared to ensure that the folder group is used and not the user's default group when adding files.

Here's my problem:

Jack is on a Windows 7 machine and creates a new folder "New Folder" in the samba shared folder. Jill is logged onto the linux machine. Jill can read the contents of "New Folder" but can't modify or delete it. Why?

If Jill creates a folder "New Folder 2" in the /shared direcory while logged in, Jack can see this folder fine and can modify/delete it.

Why are the permissions different when a file or folder is added in windows to when I create the folder on linux?

I want the default behaviour to be that members of the Developers group have read write permissions on all files and folders in the directory. So if Jack adds a folder in windows, Jill has permissions to delete it by default.


Permissions are being set by two different programs. If you're at Linux shell then your shell value for umask controls how permissions are set on new files. With Samba the permissions are set by your smb.conf file's "create mask" or "directory mask" value (or the defaults of course if you don't specifically set them).

Here's an extract from my smb.conf (Ubuntu 10.4):

File creation mask is set to 0700 for security reasons. If you want to

create files with group=rw permissions, set next parameter to 0775.

; create mask = 0700

Directory creation mask is set to 0700 for security reasons. If you want to

create dirs. with group=rw permissions, set next parameter to 0775.

; directory mask = 0700

  • exactly what I was looking for :) – Matt Aug 8 '10 at 3:22
  • I have sometimes this same problem but also, frequently, as administrator I am losing the right to define who has access to some shares from Windows. Access denied is shown. – msmafra Feb 5 '15 at 19:03

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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