[clue-tech] Re: Samba, masks and forcing groups
David L. Willson
DLWillson at TheGeek.NU
Thu Mar 13 17:35:34 MDT 2008
> My question is how to set the masks in samba so that user and groups have full
> permissions. And related to that, when I make changes, what is the proper way
> to make the new settings current.
>
> Basically, I have tried to set permission masks set to 770 for user and
> groups. I also have "force groups winusers". When I check on the Linux side,
> I see that the permissions are set to samba owner only, and the group is the
> owner name as well (not winusers).
>
> So far, I've been restarting samba through /etc/init.d. Is there a more
> appropriate method?
>
> I'll copy and paste the appropriate smb.config lines this evening.
Adrian,
I was holding these for your smb.conf, but I haven't seen that, so here they are, in no
particular order:
- Using the script in /etc/init.d is the best way to restart any service, because it's
the most portable across Linuxen.
- Make sure all the users coming in through samba are members of the target group.
grep "winusers" /etc/group
- Make sure your samba lines are correct. You may want one, more, or all of the
following present in your [global] section.
force group = winusers
force create mode = 0660
; there is no "force mode" option
force directory mode = 2770
; force security mode = 0000
; force directory security mode = 0000
create mask = 7777
directory mask = 7777
directory security mask = 7777
- Reset ownership and permissions on pre-existing files and directories in the shared
folder.
chown -R .winusers "shared folder"
find "shared folder" -xtype d -exec chmod 2770 {} \;
find "shared folder" -xtype f -exec chmod 0660 {} \;
David L. Willson
Trainer/Engineer/Consultant
MCT, MCSE, Linux+
(720) 333-LANS
More information about the clue-tech
mailing list