[PATCH] dos mask readonly feature for samba 3.0.10
idra at samba.org
Mon Jan 3 15:36:56 GMT 2005
wouldn't it be easier to store DOS Attributes in EAs ?
That way the Readonly attribute is not mapped at all on system
permissions and you can set it freely when you want without touching
On Mon, 2005-01-03 at 16:23, Maier, Thomas wrote:
> Hello Samba Devs,
> we want to supply a patch for Samba, based on the latest released Samba
> 3.0.10 source code.
> We call the patch: dos mask readonly patch
> Patch features:
> The "dos mask readonly" patch supplies the ability to mask the dos readonly
> attribut on samba shares.
> E.g. a file on the unix side with permissions r--r--r-- will look on the
> windows side as
> readonly attribut = not set. But the file keeps readonly!
> The new option for the smb.conf is: dos mask readonly = yes|no
> You can use it in the [globals] section or in a share definition section.
> Default setting for "dos mask readonly" is "no".
> Why did we do this, or why it can be useful:
> If you copy files from a readonly samba share using the windows explorer or
> some other tools,
> file attributes are preserved at the copied file. In some cases this is not
> desired if the copied
> files should or must not be readonly. In such cases you have to a) remove
> the readonly attribut
> (manually) or b) use a copy tool that does not preserve file attributes.
> Our situation: we have a database tool that should import files from a
> readonly samba share into
> its database. But the imported files must not have the readonly attribut
> set! The only way to do
> this without this patch is to do an extra copy step and remove the readonly
> attribut before the
> import. This is not acceptable (time problems) if you have to copy/import
> large amount of files (>10 GB).
> We are now running Samba 3.0.4 with the "dos mask readonly" patch for a long
> time on Sun Solaris 8 (sparc)
> and it works nicely ;)
> The patched code parts keeps the same in 3.0.4 and 3.0.10, so the supplied
> patch is for Samba 3.0.10 now.
> Modified files:
> The patch file was generated with GNU diff -Nur
> Would be glad if this patch will make it into Samba.
> Thomas Maier
> IZB SOFT GmbH & Co. KG
> Bereich S84
> St.-Martin-Straße 47
> 81541 München
> Telefon: 089/4907-2151
> E-Mail: mailto:Thomas.Maier at izb-soft.de
> Internet: http://www.izb-soft.de
Simo Sorce - idra at samba.org
Samba Team - http://www.samba.org
Italian Site - http://samba.xsec.it
More information about the samba-technical