Ownership of newly created objects? - SMB
This is a discussion on Ownership of newly created objects? - SMB ; How do I configure Samba so that any new object created in a
particular Samba share always ends up with a particular group
ownership?
Example:
- I have a share /home/my_project
- Directory 'contracts' inside the share, and ownership:
# ...
-
Ownership of newly created objects?
How do I configure Samba so that any new object created in a
particular Samba share always ends up with a particular group
ownership?
Example:
- I have a share /home/my_project
- Directory 'contracts' inside the share, and ownership:
# ls -l /home/my_project
drwxrwx--- 2 someuser mygroup 4096 May 11 01:48 contracts
- User 'joe' is has default group 'users', and is member of the group
'mygroup'.
- A new file 'new_file' is created by user 'joe' inside the
my_projects,
folder, and ends up with the following permissions:
# ls -l /home/my_project/contracts
-rwxr-xr-x 1 joe users 529 May 12 04:08 new_file
NOTE: the ownership and permissions on the file that 'joe' created
are
those that 'joe's' user/group and umask dictate.
- The relevant part of smb.conf is:
[my_project]
path = /home/my_project
force group = mygroup
create mask = 0660
directory mask = 0770
What am I doing wrong?
Thanks,
--Ulf
-
Re: Ownership of newly created objects?
In comp.os.linux.networking arabub wrote:
> How do I configure Samba so that any new object created in a
> particular Samba share always ends up with a particular group
> ownership?
> # ls -l /home/my_project
> drwxrwx--- 2 someuser mygroup 4096 May 11 01:48 contracts
An easy way is to make the directory SetGID mygroup, which means that
any new object in that group will get the group membership of the group
of the directory.
but 'force group' ought to work as well, I would think.
--
Cameron Kerr
cameron.kerr@paradise.net.nz : http://nzgeeks.org/cameron/
Empowered by Perl!