Issue 65002

Summary: [Samba] can't create backup copy on cifs samba shares
Product: General Reporter: zenyatta <rsolsn>
Component: uiAssignee: AOO issues mailing list <issues>
Status: CONFIRMED --- QA Contact:
Severity: Trivial    
Priority: P3 CC: avagula, baumux, chris_mux, chrlutz, issues, jfrantzius, jonathan, mike.gual, mux2005, rainerbielefeld_ooo_qa, strob08, zuo
Version: OOo 2.0.2Keywords: oooqa
Target Milestone: ---   
Hardware: All   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description zenyatta 2006-05-02 15:51:45 UTC
i've linux clients with mounted samba shares via cifs (as for the locking file
"problem").
the problem is that opening and modifing a calc file on a mounted share, when i
click save , i always get "can't create backup copy", if i click ok to this
message and then "save" everithing is ok; if i use "save with name", no problem. 
I didn't select to "always save backup copy" in the OO options, i tried to
change the default path of the backup copy with no result.
If i try to use the nobrl option in the mount.cifs (or even use smbfs)
everithing is ok but i come back with the file locking problem, that is worst
than this problem.

alessandro
Comment 1 jernst 2006-11-01 14:22:37 UTC
This bug affects all components, likely a framework issue.
Comment 2 axelmasok 2006-11-28 03:33:03 UTC
Yes I have always had this problem through versions of v2.
Over Samba and over NFS mounts. Works OK for me on local volumes.
Would be nice if it gets fixed oneday....
Comment 3 olly600 2006-12-28 08:46:33 UTC
Please could you replicate this issue with openoffice.org version 2.1 and see if
it still  occurs. 
Comment 4 zenyatta 2006-12-28 10:57:42 UTC
yes.
same problem with 2.1.0 version.
Comment 5 episodeiv 2007-01-03 10:17:13 UTC
I can confirm this bug on OOo 2.1.0 running on gentoo. Disabling locking
(mount.cifs's nolock mount option) does not help.
Comment 6 dsitsolutions 2007-01-22 18:53:59 UTC
I can confirm this with version 2.1 on both Linux and Windows, and in Calc and
Writer.  

I have a system running Gentoo, using a binary install of OpenOffice 2.1.  In
both Writer and Calc (I have not tried the other parts of OpenOffice) whenever I
click the Save icon to save a document that is stored on my Samba server it
pauses for a couple seconds and pops up a dialog box to report it could not
create a backup.  If I click OK on the dialog box, then immediately click the
Save icon again it saves the file without complaint.  During the first attempt
it not only does not create a backup, it does not actually save the file.  

At work I use a Windows XP computer and save files to a file server running
Windows Server 2003.  Again, I'm using OpenOffice.org 2.1.  In both Writer and
Calc I can open up a file from the server, make some changes and click the Save
icon.  The first time I click save after opening the document it saves without
incident.  Every subsequent time I modify and click Save OpenOffice freezes for
a few minutes before popping up a dialog box saying "Could not create backup
copy."  Again, if I click OK and immediately click Save again it saves quickly
and without problem.  

I've noticed this issue in the 2.0.x versions of OpenOffice on Linux and this is
not a very big problem on Linux because the freeze is for only a second or two
and I can just hit Save again immediately to successfully save my file.  

This is a big problem in Windows because the application freezes for minutes
instead of seconds, and all open OpenOffice windows freeze, so if I'm working
with a spreadsheet and a couple of Writer documents, I click Save in any one of
these open files and all work on any open file is halted.

This only happens for files that are opened from network shares, if the file is
on my local hard drive this does not happen in either Linux or Windows.  

In both of the above scenarios I have unchecked the "Always create backup copy"
checkbox in the Options dialog.  I have not changed the default backup path on
either system, I can confirm that the Windows XP default backup path is pointing
to a folder on my C: drive.

I believe this Issue needs to be escalated to include multiple components and
multiple operating systems.

ds
Comment 7 dsitsolutions 2007-01-22 18:54:33 UTC
I can confirm this with version 2.1 on both Linux and Windows, and in Calc and
Writer.  

I have a system running Gentoo, using a binary install of OpenOffice 2.1.  In
both Writer and Calc (I have not tried the other parts of OpenOffice) whenever I
click the Save icon to save a document that is stored on my Samba server it
pauses for a couple seconds and pops up a dialog box to report it could not
create a backup.  If I click OK on the dialog box, then immediately click the
Save icon again it saves the file without complaint.  During the first attempt
it not only does not create a backup, it does not actually save the file.  

At work I use a Windows XP computer and save files to a file server running
Windows 2003 Server.  In both Writer and Calc I can open up a file from the
server, make some changes and click the Save icon.  The first time I click save
after opening the document it saves without incident.  Every subsequent time I
modify and click Save OpenOffice freezes for a few minutes before popping up a
dialog box saying "Could not create backup copy."  Again, if I click OK and
immediately click Save again it saves quickly and without problem.  

This only happens for files that are opened from network shares, if the file is
on my local hard drive this does not happen in either the Linux/Samba
environment or in the Windows environment.  

In both of the above scenarios I have unchecked the "Always create backup copy"
checkbox in the Options dialog.  I have not changed the default backup path on
either system, I can confirm that the Windows XP default backup path is pointing
to a folder on my C: drive.

I believe this Issue needs to be escalated to include multiple components and
multiple operating systems.
Comment 8 Rainer Bielefeld 2007-02-09 05:51:40 UTC
Related to  Issue 70600?
Comment 9 avagula 2007-02-09 07:24:16 UTC
*** Issue 70600 has been marked as a duplicate of this issue. ***
Comment 10 g111 2007-02-16 12:43:42 UTC
*** Issue 65002 has been confirmed by votes. ***
Comment 11 frank 2007-02-16 13:19:57 UTC
Hi,

as it seems to affect all applications, component changed to framework and
re-assigned.

Frank
Comment 12 zuo 2007-02-25 02:09:06 UTC
Try setting option "oplocks = no" in smb.conf. It helped in my case.

("locking = no" -- helped also but IT IS NOT RECOMMENDED because lack of locking
may result in data corruption)

All the best
Jan Kaliszewski
Comment 13 zuo 2007-02-25 02:22:32 UTC
PS.

> I didn't select to "always save backup copy" in the OO options, i tried to
> change the default path of the backup copy with no result.

That "can't create backup copy" message is annoying (so it's a bug?). The file
which doesn't want to be written is the file you trying to save, not a backup copy.

All the best.
Comment 14 zuo 2007-02-25 02:27:57 UTC
PS2.
With a backup copy also is that problem -- if you turn on "always save backup
copy" option (then you get "can't create backup copy" message twice).

PS3.
> Try setting option "oplocks = no" in smb.conf
...on the Samba server of course -- if you have access to server conf.
Comment 15 zenyatta 2007-04-09 12:53:13 UTC
please consider that from opensuse10.2 , for example, smbfs module isn't
compiled in the default kernel so a normal user will have this annoying problem
with cifs module that is the only way to mount windows shares.
So i think this bug have to be solved sooner as possible.....

regards
Comment 16 gach 2007-04-29 16:19:18 UTC
This bug is serious as samba ships with oplocks = yes by default.

Can we have the source of the problem explained?

File locking (at least with flock()) seems to work as expected under cifs
mounted shares using the default samba config.

What causes this problem and why does it dissapear with 

oplocks = no 

on smb.conf?

Comment 17 jvtaus 2008-05-15 12:41:23 UTC
Hi,

I make some test with this interesting results: the problem (ie can't create
backup copy when file is stored on a cifs filesystem) only occurs if the format
of the document is o?t. If the file is txt, html, doc, xml, ... I can save it
without  get "can't create backup copy" message.

I expect this information help to solve the problem as soon as possible.

Josep
Comment 18 avagula 2008-05-15 15:14:59 UTC
Happens also with xls files (and sx*).
Comment 19 jvtaus 2008-05-19 07:34:53 UTC
Hi,

Although saving in txt, doc, ... doesn't appear "can't create backup copy"
message, serious problems with file locking continue (same problems as with OO
formats) :-(

Josep
Comment 20 jfrantzius 2008-10-22 09:10:40 UTC
Following Novell support advice, I tried the CIFS mount option "nobrl". That
immediately and entirely solved all of these problems for me.

For the archives, this is what I had been told by Suresh Jayaraman from Novell:

' Please try "nobrl" mount option and see whether the problem is fixed. This
option allows to not send byte range lock requests to the server. This is
necessary for certain applications that break with  cifs  style mandatory byte
range locks (and most cifs servers do not yet support requesting advisory byte
range locks). '

He wasn't able to reproduce the failures, however my samba host is a windows
2000 server box, and that is the only environment he wasn't able to get hold of.
Maybe others experiencing problems could comment here what operating system
their samba hosts are running on?
Comment 21 avagula 2008-10-22 09:54:51 UTC
I saw problems on shares at WinXP Pro sp(whatever) and WD Netcenter network 
drive (no idea, what  its is running, maybe Linux).