[Samba] Group file ownership...

Michael G. Noble mnoble at rfmagic.com
Fri Jan 17 17:16:01 GMT 2003


Check the permissions on the directory where the files are being
created.  If you want the group name to always be the same then 
all you have to do is set the SGID bit.  This is done with
chmod g+s <directory name>.  If you have sub directories then you will 
need to change each sub directory as well.  Then of course you will need
to change the group name on all files and directories to the one you 
desire.  Here are all the steps you will need to take ( I will assume
you are in the directory you wish to make the changes to and that you
are root and that the group name to change to is foo):

chgrp -R foo .
find . -type d -exec chmod g+s {} \;

NOTE: please take note of the '.' in the above examples.

You are all done.  Now every file that gets written/created in directory
and all sub directories will have the group name foo.

Mike

On Sat, 2003-01-18 at 08:48, bri wrote:
> I've been trying to figure out the same problem
> 
> I've been investigating umask settings in /etc/bashrc, setting the setgid
> bit on the directories with chmod and also using inherit permissions = yes
> in the samba configuation file
> 
> I've also tried the following smb.conf options:
>    create mask = 0770
>    force create mode = 000
>    directory mask = 2775
> 
> Let me know if you find a workable solution - I'm still searching
> 
> 
> 
> -----Original Message-----
> From: samba-admin at lists.samba.org [mailto:samba-admin at lists.samba.org]On
> Behalf Of Brad
> Sent: Friday, January 17, 2003 1:32 AM
> To: Sambauser mailing list
> Subject: [Samba] Group file ownership...
> 
> 
> We have a Red Hat 7.3 file server that serves about 30 Windows PCs via Samba
> 2.2.3a.
> 
> I have one group called "users" that everyone is in but when a file is
> created
> by a PC, the group ownership on the created file is not "users", but the
> same
> as the file owner name. Is there any way to force the group ownership of
> created files?
> 
> Also, is there any way to force file ownersip to a given user on newly
> created
> files?
> 
> Regards,
> Brad
> --
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
> 
> ---
> Incoming mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.438 / Virus Database: 246 - Release Date: 1/7/03
> 
> ---
> Outgoing mail is certified Virus Free.
> Checked by AVG anti-virus system (http://www.grisoft.com).
> Version: 6.0.438 / Virus Database: 246 - Release Date: 1/7/03
> 
> -- 
> To unsubscribe from this list go to the following URL and read the
> instructions:  http://lists.samba.org/mailman/listinfo/samba
-- 
Michael G. Noble			RF Magic, Inc.
Senior System Administrator		10182 Telesis Ct., 4th Floor
					San Diego, CA.   92121
mailto:mnoble at rfmagic.com		voice: (858) 546-2401 x207
					fax:   (858) 546-2402
--
There is Sanity in my Madness!




More information about the samba mailing list