Directory Mask is not properly working on samba shared folders
Hi All,
I have Fedora core 8 installed in my machine, in which I have shared certain folders (public) for windows access.
--------
Sample Configuration of my smb.conf
[common]
comment = Common to all
path = /mnt/common
writeable = yes
directory mask = 0777
; browseable = yes
write list = +staff
valid users = <list of " +staff " group members separated by comma, which got added automatically when "Only allow access to specific users" option is selected and given permissions to those who are only under "+staff" group through Samba Server Configuration Wizard using "system-config-samba" command>
--------
And the folder (in my case the folder name is "common") permission is set to 0777, where uid =<samba-user>, gid=+staff.
Example:
drwxrwxrwx 3 <samba-user> <staff> 12288 2009-03-17 15:40 common
The problem is, whenever a file which is under "common" (the public folder) is edited by any of the user who is under "+staff" group, the particular file's ownership and permission is got changed to that particualr user. If an another member user who is under the same "+staff" group tries to access the same file, he/she can view it as Read-only but cannot write to it, throws "no permission, access denied" error.
Example of a file whose permission and ownership got changed automatically after editing it (sample.txt) by a samba-user:
-rw-r--r-- 1 <samba-user> <samba-user> 6421767 2009-02-28 05:46 sample.txt
The same problem whenever a member of "+staff" group creates a new file or folder.
Example:
-rwxr--r-- 1 <samba-user> <samba-user> 0 2009-03-17 16:35 New Text Document.txt
My requirement is, there should be a public folder, where all can access, read and write but the permission and ownership shouldn't get changed after edited by any of the member who are under "+staff" group.
Suggestions and Solutions would be a great help !
Regards,
Prabagaran L.
|