AW: [Samba] file locking options in smb.conf

Daniel Müller mueller at tropenklinik.de
Wed May 6 09:02:32 GMT 2009


Dear all,

It is the same problem with me. I run samba 3.2.8 on suse 10.2 .
Now and then we have trouble concerning the home directories 
writing  Word and Excel files.

My smb.conf for homes:
 
[homes]
	##mit dem preexec befehl wird das userverzeichnis erstellt
	root preexec=/windows/./userverzeichnis %U
	root postexec=/windows/./bshares %U
	comment=Heimatverzeichnis %U
	msdfs root=yes
	path= /windows/winuser/%U
	valid users=%S
	inherit permissions=yes
	inherit owner=yes
	force group= "Domain Users"
	read only=no
	create mask= 0750
	directory mask=0775
	browseable=no
	hide files=/Desktop.ini/Thumbs.db/lost+found/desktop.ini
	veto oplock
files=/*.pdf/*.PST/*.pst/*.doc/*.xls/*.docx/*.mdb/*.MDB/*.dbf/*.DBF/*.ppt/*.
xlsx/
	#vfs objects=extd_audit,recycle
	vfs objects=recycle
	recycle:exclude= *.tmp,*.temp,*.log,*.ldb,*.TMP,?~$*,~$*
	recycle:keeptree=Yes
	recycle:exclude_dir=tmp,temp,profile,.profile
	recycle:touch_mtime=yes
	recycle:versions=Yes

When the error occurs the word or excel file is suddenly owned mask
administrators. And the user changed it cannot save it any more. There are
from this moment on many temp files around this files.
Only after deleting the admins mask ownership, and the temp files by hand
the word, excel files will be
Writeable again.
On our old samba 2.2.7 still running we do not have this trouble (the same
windows versions, the same office versions!!!).
 

-----------------------------------------------
EDV Daniel Müller

Leitung EDV
Tropenklinik Paul-Lechler-Krankenhaus
Paul-Lechler-Str. 24
72076 Tübingen

Tel.: 07071/206-463, Fax: 07071/206-499
eMail: mueller at tropenklinik.de
Internet: www.tropenklinik.de
-----------------------------------------------
-----Ursprüngliche Nachricht-----
Von: samba-bounces+mueller=tropenklinik.de at lists.samba.org
[mailto:samba-bounces+mueller=tropenklinik.de at lists.samba.org] Im Auftrag
von Anoop P.A.
Gesendet: Mittwoch, 6. Mai 2009 08:36
An: Volker.Lendecke at SerNet.DE
Cc: samba at lists.samba.org
Betreff: RE: [Samba] file locking options in smb.conf


Hi list,

Any body implemented cross protocol file locking before? Any pointer
will help me a lot

Hi Volker,

CIFS -> CIFS locking is not working as expected. It failed for me in
following scenario.

1. Opened a share using browser in Win XP machine.
2. Copied a word document (*.doc) to share.
3. Mounted CIFS share in a Ubuntu (8.04 LTS desktop). 
4. Opened word document from Ubuntu using openoffice 2.4
5. Tried to open same file in Win XP but it didn't open and got error
message "No proper file permission" (I expect word document to open   in
read only mode).

However if I open document first in Win XP and then using Open office
working as expected i.e. Document getting opened in read only mode.
 
Thanks
Anoop

> -----Original Message-----
> From: Volker Lendecke [mailto:Volker.Lendecke at SerNet.DE]
> Sent: Tuesday, May 05, 2009 5:19 PM
> To: Anoop P.A.
> Cc: samba at lists.samba.org
> Subject: Re: [Samba] file locking options in smb.conf
> 
> On Tue, May 05, 2009 at 04:27:30AM -0700, Anoop P.A. wrote:
> > Hi Volker,
> >
> > Thanks for the reply.
> > I want basic file locking work as expected. ( i.e. I want to prevent
> files from getting corrupted while shared across multiple platforms).
> > If some file is opened writing in one client, other clients should
not
> be able to write in to it.
> >
> > My server failing in many scenarios, I could explain one of the
scenario
> as follows.
> >
> > 1. Opened a share using browser in Win XP machine.
> > 2. Mounted same share in a Linux machine through nfs.
> > 3. Initiated a 1 GB file transfer to share in windows
> > 4. Same time tried to copy a file with same name in nfs share.It
asked
> to overwrite existing file( I expect it not to start copy as write
lock of
> that file is being obtained by CIFS client)
> > 5. After a while both the transfers finished. MD5SUM showed
resultant
> file got corrupted.
> 
> No way you will achieve this cross-protocol. Unix just does
> not know how to lock a complete file like Windows/CIFS does
> using share modes. Your only chance is to only use Samba and
> a cifs client file system and ditch NFS and local file
> access.
> 
> Volker
-- 
To unsubscribe from this list go to the following URL and read the
instructions:  https://lists.samba.org/mailman/options/samba



More information about the samba mailing list