[Samba] Permissions problem

Bruno MACADRE bruno.macadre at univ-rouen.fr
Wed Jan 9 01:08:57 MST 2013

Le 24/12/2012 17:33, Michael B. Trausch a écrit :
> 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
That was a really good idea, I've just write "fake_chmod" VFS module 
that intercept chmod (and friends) invocations and return 0 without do 

This module works perfectly. I tested it with nautilus and the final 
rights on the file are like expected. I haven't tested on win7 yet but I 
think that it should be the same behaviour.

Thanks for your idea,


  Ingénieur Systèmes et Réseau     | Systems and Network Engineer
  Département Informatique         | Department of computer science
  Responsable Réseau et Téléphonie | Telecom and Network Manager
  Université de Rouen              | University of Rouen
Coordonnées / Contact :
	Université de Rouen
	Faculté des Sciences et Techniques - Madrillet
	Avenue de l'Université - BP12
	76801 St Etienne du Rouvray CEDEX

	Tél : +33 (0)2-32-95-51-86
	Fax : +33 (0)2-32-95-51-87

More information about the samba mailing list