Bug 2382 - Excel shared workbook stops working
Summary: Excel shared workbook stops working
Status: CLOSED FIXED
Alias: None
Product: Samba 3.0
Classification: Unclassified
Component: File Services (show other bugs)
Version: 3.0.11
Hardware: x86 Windows XP
: P1 normal
Target Milestone: none
Assignee: Jeremy Allison
QA Contact: Samba QA Contact
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-22 13:08 UTC by GARAMSZEGI Karoly
Modified: 2005-08-24 10:19 UTC (History)
2 users (show)

See Also:


Attachments
Proposed patch. (9.53 KB, patch)
2005-03-09 18:27 UTC, Jeremy Allison
no flags Details
Proposed patch. (9.00 KB, patch)
2005-03-24 15:26 UTC, Jeremy Allison
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description GARAMSZEGI Karoly 2005-02-22 13:08:34 UTC
After upgrading to 3.0.11, we cannot use our Shared Workbooks in MS Excel 2000
SP3. If the owner of the file opens the .xls workbook, it works. If other user
(UNIX permissions are OK) opens, the file is opened, but an error is displayed:

"File is locked. In order to save changes to the file, you can either close
the file before making any changes and then re-open it, use Save As (File
menu) to save the file using another file name, or turn off Shared
Workbooks and then save the file."

After pressing OK, I cannot even save to the same filename.

If I uncheck the "Shared file" checkbox, no error occurs.
Comment 1 Gerald (Jerry) Carter (dead mail address) 2005-03-09 09:10:26 UTC
jeremy, can you bump this one up on your list.  We've 
got multiple reports on it.

Current thread can be found at

http://lists.samba.org/archive/samba/2005-March/101686.html
Comment 2 Chad Vincent 2005-03-09 09:56:40 UTC
Hopefully helpful:

Full text of error message:

"File is locked.  In order to save changes to the file, you can either close the
file before making any changes and then re-open it, use Save As (File menu) to
save the file using another filename, or turn off Shared Workbooks and then save
the file."

Installing the "Custom Error Messages" add-in does not yield a "Web Info" button
on that error message.
Comment 3 Jeremy Allison 2005-03-09 13:26:27 UTC
Note from the list. Here is a MS-knowledgebase article on the problem :

http://support.microsoft.com/default.aspx/kb/324491?

Jeremy.
Comment 4 Jeremy Allison 2005-03-09 18:27:39 UTC
Created attachment 1022 [details]
Proposed patch.

Ok, please give this a try (it's checked into SVN also).
Thanks,
Jeremy.
Comment 5 Jeremy Allison 2005-03-09 20:45:47 UTC
I've realised that the semantics of this patch aren't quite right - I need to
save the pending_modtime only as long as the fsp that received the change time
request is open - the current patch keeps it around for as long as any file open
on the same dev/ino pair is open. I need to add a "pending_modtime_owner" field
to the fsp struct and keep track of who was sent the time change request.
Look for this fix tomorrow (3/10/2005 US Pacific time). The current patch should
work well enough to test against though.
Jeremy.
Comment 6 Jeremy Allison 2005-03-10 14:47:26 UTC
Ok, the modified fix is in the SAMBA_3_0 and HEAD SVN code. I'm testing now with
Office 2003 and so will wait for confirmation from a customer before closing -
but I think this may be fixed now.
Jeremy.
Comment 7 GARAMSZEGI Karoly 2005-03-22 12:01:51 UTC
I have tested with the new 3.0.12 Debian Binary packages from the Samba
repository, and with NO success. The "user" behaviour is the same, the same
error messages come up.
Comment 8 Paul Blattner 2005-03-22 17:33:25 UTC
We are getting the same thing on our server running 3.0.12 compiled from the
tarball.  Only the user that is the owner of the file is able to work with a
shared workbook. .  Everyone else gets the "File is locked" message even though
we are all members of the group that owns the file.
Comment 9 Jeremy Allison 2005-03-22 18:23:08 UTC
I've just tried and cannot reproduce this using Office 2003 Professional 
version 11.5612.5606 on XP and version 11.6355.6408 on Win2K3.

Is it specific to Office 2000 ? Can you reproduce it on Office 2003 ? I'm trying
to track down if this is a Office version specific bug, in which case I'll
downgrade my version of Office to test.

Jeremy.
Comment 10 Paul Blattner 2005-03-23 10:58:05 UTC
It's happening for us with Excel 2003 (11.6355.6360) SP1 on Windows XP SP2.
Comment 11 Jeremy Allison 2005-03-24 15:26:39 UTC
Created attachment 1113 [details]
Proposed patch.

Ok, I have a working theory for this. It concerns ACLs and what happens
when excel wants to update the filetime on a file the user doesn't own.
									       
							
Normally you just set the "dos filetime" parameter to allow this (this
causes a timestamp to be updated on a file if you can write to it - normally
POSIX only allows this if you're the owner). I've realised the codepath
here doesn't check ACL semantics. This is a bug we've had since we
introduced ACLs a long time ago but only now seems to have been triggered.
									       
							
Here is a patch to the just released 3.0.13 that causes ACL entries to be
properly checked when "dos filetime= True" has been set.
									       
							
Please try this on top of 3.0.13 and let me know if it fixes the issues.
Comment 12 Paul Blattner 2005-03-24 16:03:17 UTC
Actually, setting dos filetime = true solved the problem (I thought I had tried
that before, but was it turns out I was editing the wrong conf file.)  If I had
known that Excel needs to modify the time on shared files, I would have looked
more closely at it before commenting here.  Sorry for the confusion, but
hopefully it will solve the other user's problem.
Comment 13 Jeremy Allison 2005-03-24 16:24:15 UTC
Thanks - I'm closing this one out.
Jeremy.
Comment 14 Gerald (Jerry) Carter (dead mail address) 2005-08-24 10:19:16 UTC
sorry for the same, cleaning up the database to prevent unecessary reopens of bugs.