Move files do not change group as copying does.

Gerald (Jerry) Carter jerry at samba.org
Tue Feb 4 06:33:48 GMT 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, 31 Jan 2003, Ola Lundqvist wrote:

> The problem this time is that we have set up a permission structure
> for files in about the same way as windows do, using groups. 
> The problem is that in windows, the files inherit the group
> membership from the directory where the files (and subdirs) reside.
> 
> This works fine now if the user copy the files from one place
> to the other. The problem is that if the files (and dirs) is moved
> an ordinary rename(a,b) command is used which means that the
> group membership is not changed. I use sgid on directorys to
> emulate windows behaviour but this do not help if moving files.
> 
> I have looked at the code and see that there is a
> rename(a,b) emulation function, but that tries to emulate
> it truely so it gives the same problem.
> 
> My suggestion is that a recursive chgrp is performed
> to the destination for all dirs and files that has the same
> group id as the source file or dir.
> 
> What do you think about this?

I don't think this is the path of least surprise.  
If I move a file, it should keep the same ownership permission.
I think you might be referring to the Win2k "inherit" permissions
check box.  IMO this is not Samba's responsibility to emulate.
It would be more effeciently done by the file system itself.





cheers, jerry
 ----------------------------------------------------------------------
 Hewlett-Packard            ------------------------- http://www.hp.com
 SAMBA Team                 ---------------------- http://www.samba.org
 GnuPG Key                  ---- http://www.plainjoe.org/gpg_public.asc
 "You can never go home again, Oatman, but I guess you can shop there."  
                            --John Cusack - "Grosse Point Blank" (1997)


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (GNU/Linux)
Comment: For info see http://quantumlab.net/pine_privacy_guard/

iD8DBQE+P17TIR7qMdg1EfYRAk/OAKCSw3pKQulBvAap/Z7FIDC/uq0g+ACfS9Jp
et1Lzmmok8FagMCdYgy3n3g=
=P/yS
-----END PGP SIGNATURE-----



More information about the samba-technical mailing list