[Samba] Permissions problem

Michael B. Trausch mbt at naunetcorp.com
Mon Dec 24 09:33:44 MST 2012


On 12/20/2012 10:05 AM, Bruno MACADRE wrote:
> If I copy this file in command line the mode is 660 as expected, If I
> want to simulate the file explorer behaviour I must do a 'cp
> --preserve=mode' copy.
> 
>     Is there a way to forbid this behaviour ? Or is there something
> wrong in my configuration ?

The only way that I could think of would be to write a Samba VFS module
that prevented invocation of the chown(2) and chmod(2) system calls (and
friends).  Such a VFS module would need to return a suitable error code,
which would more than likely then be passed back to the client.

Or you could simply "stub" the chown/chmod (and friends!) system calls
such that they return success but are effectively no-ops.

Someone else with more intimate experience with Samba's code may have a
better option, but that's the only one I can think of at the moment.

	HTH,
	Mike



More information about the samba mailing list