I'm sharing a directory, /home/pi/pydev
on a debian box (raspberry pi, in fact) with Samba. I'm reading from and writing to that directory from a Windows 7 machine.
When I create, under W7, a file in that directory, it gets 0764 rights, and it's owned by user rolf and group rolf - that's me on the W7 machine.
User pi on the debian box and user rolf (on W7) both need to be able to modify files in that directory, so I made them both member of group coders
, hoping I could configure it so that members of coders have at least read & write access to files in that directory. .
But user pi can't modify any file that belongs to group rolf.
I could chmod rolf:coders <filename>
file by file.
Adding user pi to group rolf is ugly, and doesn't work (didn't expect that. Does Samba maintain an entirely different user administration with groups, beside Debian's?).
I could also log on to the debian machine as rolf, and navigate to that folder.
But the most elegant way (to me) would be if a file created by rolf from the W7 machine would get userid rolf and groupid coders, by default.
Can I configure Samba to do that, or is there some other way to automate that task?
create mask = 0775
– danielson317 Jun 09 '17 at 02:11force
directives make any user do operations as the specified user/group? say e.g. you have a share/joe
and a share/anne
, if you doforce user = anne
on share/anne
, then userjoe
can access/anne
, big no-no and a big security risk! this option is so misleading it should be documented better and not used lightly – Gizmo Jan 24 '18 at 13:52