Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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.

share|improve this question
add comment

1 Answer

up vote 1 down vote accepted

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

share|improve this answer
    
exactly what I was looking for :) –  Matt Aug 8 '10 at 3:22
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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