AW: [PATCH] dos mask readonly feature for samba 3.0.10
Thomas.Maier at IZB-SOFT.de
Tue Jan 4 09:56:21 GMT 2005
We run Samba under Sun Solaris 8 in conjunction with IBM/Rational ClearCase.
Samba is used to "export" labeled ClearCase version elements to the Windows
world. To be precise, the Samba share points to a ClearCase dynamic view.
The problem with "store dos attributes" is:
1) Solaris 8 seems not to support extended attributes
2) i am not sure if the ClearCase mvfs filesystem will support extended
e.g. in smb.conf:
path = /export/home2/lanman/share # contains sym. links to
clearcase views like /view/VIEWNAME/vobs/VOBNAME
force user = pttrans
oplocks = Yes
level2 oplocks = Yes
read only = Yes
# store dos attributes = yes
# map hidden = no
# map system = no
# map archive = no
dos mask readonly = Yes
Using "store dos attributes" will not lead to the desired effect.
Maybe there is another way to mask out the DOS readonly attribute rather
then modifing dosmode.c, but i do not know how ;)
IZB SOFT GmbH & Co. KG
E-Mail: mailto:Thomas.Maier at izb-soft.de
Von: Simo Sorce [mailto:idra at samba.org]
Gesendet: Montag, 3. Januar 2005 16:37
An: Maier, Thomas
Cc: 'samba-technical at lists.samba.org'; 'tridge at samba.org'; Greger, Markus
Betreff: Re: [PATCH] dos mask readonly feature for samba 3.0.10
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
> 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
> some other tools,
> file attributes are preserved at the copied file. In some cases this is
> 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
> 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
> 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