[SAMBA] Retaining ownership of files

Yura Pismerov ypismerov at tucows.com
Tue Nov 5 15:00:59 GMT 2002


	chown -R group /path/to/the/share
	chmod -R g+w /path/to/the/share group
	find /path/to/the/share -type d -exec chmod g+s {} \; 

In smb.conf you will need only 2 options:

create mode = 0664
directory mode = 0775

But all those 60+ developers should be in that group if they also have
direct (shell) access to the files. You also should change umask to 002
for their shells.

If you want to maintain different groups within the same share/directory
you can run the
same 3 commands I mentioned but replace "share" with particular
sub-directory name and "group" with particular group. 
This setup will allow to maintain proper group ownership on OS level
(which takes precedence over Samba setup), so on the Samba level you
will only have to take care of the proper modes on the
files/directories.

I hope this helps.


> Tommy.Fallsen at kongsberg.com wrote:
> 
> Hi
> I want users to edit each other files, but not having the ownership
> changed at all I.e. user1 create a word doc, user2 can edit it, but
> the ownership is not changed to user2.
> 
> force create mode
> force directory mode
> force user
> force group
> 
> I know of these , but our share have tons of dirs with files that have
> different users and groups, 60+ developers working together.
> 
> Are there any new options in 2.2.6 that can fix this?
> 
> thanks
> 
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Tommy Fallsen   System Administrator
> Kongsberg Defence & Aerospace
>                         Email: tommyf at kongsberg.com
>                         TEL: +47 32287783 MOB +47 93057326
>                         WEB: http://www.kongsberg.com/eng/kog/
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> 
> "The information in this e-mail and in any attachments is
> confidential and intended solely for the attention and use
> of the named addressee(s). This information may be subject
> to legal, professional or other privilege and further
> distribution of it is strictly prohibited without our
> authority. If you are not the intended recipient, you
> are not authorised to and must not disclose, copy, distribute,
> or retain this message or any part of it, and should notify
> us immediately."



More information about the samba mailing list