Click to See Complete Forum and Search --> : Samba and Force Group problem


fishface
07-13-2006, 04:04 PM
I'm having permissions problems with a Samba share with regards to group access.

I use SWAT to configure.

The directory PDG permissions are set to rwxrwr the group wwmat having rw permissions, owner having rwx, rest read only - all works when using Linux.

Here is a snippet of my smb.conf

[global]
workgroup = MYDOMAIN
security = DOMAIN
map to guest = Bad User
passdb backend = smbpasswd:/etc/samba/smbpasswd
username map = /etc/samba/smbusers
printcap cache time = 750
logon path = \\%L\profiles\.msprofile
logon drive = P:
logon home = \\%L\%U\.9xprofile
local master = No
ldap suffix = dc=example,dc=com
ldap machine suffix = ou=Computers
ldap idmap suffix = ou=Idmap
printer admin = @ntadmin, root, administrator
cups options = raw



[pdg]
path = /server/myserver/pdg
force group = pdg
read only = No
create mask = 0664

Browsing is enabled

The problem is this, the only way I can get a user who is in the pdg group to read and write to this share is to set it to 'read only = no', which is not ideal as lots of other users can then have rw access. I would like the share to be able to be read by anybody but only rw by the pdg group. I cannot see what I'm doing wrong, I've thought the 'force group' option a mask of 664 should work - I'm obviously doing something wrong! :confused:

happybunny
07-13-2006, 04:38 PM
i beleive it is a combination of permissions that allow ro vs rw.

For instance, if samba says I can write to something, I still need file system permissions to do so.

So make the samba share r/w, but leave the file system permissions rw for one set then ro for another.

fishface
07-13-2006, 05:59 PM
Not sure I get it....logged on as root, pdg directory is 664, the group being pdg...so if I've set Samba up as 664 and force group to pdg shouldn't that work?

A Samba user should get the pdg group permissions which are rw...sorry to be so thick :o

leonpmu
07-15-2006, 03:08 AM
What he is saying is that fro samba sharing there are two sets of permissions. 1 from Samba and the other from the system itself. The system permissions will ALWAYS override ANY permissions from Samba. So you can set the permissions for other to ro o n the actual partition on the system but set samba to rw without any problems...