RE: [SLUG] SAMBA and user rights

From: Grantham, Patrick (Patrick.Grantham@vacationclub.com)
Date: Fri Aug 03 2001 - 08:30:13 EDT


thanks. I put it place!

-----Original Message-----
From: Kevin Fogleman [mailto:snotr0cket@home.com]
Sent: Thursday, August 02, 2001 7:47 PM
To: slug@nks.net
Subject: Re: [SLUG] SAMBA and user rights

I assume that you are using share-level security in your smb.conf file, as
that would be the only reason that I could think of if it was
creating files as root. In that case, what you need to do is create a
special system account for Samba. Place this account in the webdev
group. Then, edit your smb.conf file by placing the option

guest account = <name of account you just created>

under the [global] section of the file. That should cause smbd to run as
the user you specified when someone connects to the share. Now,
the second thing you need to do is to go through the smb.conf file and find
all the shares that you want webdev to have access to. In each
share (or under the [global] section if you want this for all the shares),
add the option

create mask = 770

What "create mask" does is set the initial file permissions for every file
created by the server process, which includes all the user
files. You really set this to whatever you want, but that is what I'm using
on my server right now.

Now all you have to do is chown all the files in the shared directories on
the server to the UID that you used for "guest account" and chmod
all the files to the mode that you used in "create mask".

--Kevin Fogleman

"Grantham, Patrick" wrote:
>
> I am finding that when a new file (or folder) is created by MS client on
the
> linux samba share, the user that samba is running (root) is the owner of
the
> file. This is not ideal since some content is edited (and/or created) via
> ftp. How can I change this setting? I would prefer that when a file is
> created that the owner becomes nobody, the group is webdev with group
> read,write exe. Currently I do this via a script:
> chown nobody
> chgrp webdev
> chmod g+rwx
>
> What would be a better way to have the rights change via samba. Ideally
the
> rights should be inherited from the rights of the folder. At least this
is
> what I think.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 18:32:47 EDT