I'm short of time right now, but I have a feeling that the info below may be useful in sleuthing this out. Still, I don't why a broken connection to the NAS is the thing that triggers the lockout. Maybe subsequent iterations of Samba addressed the problems below, but the broken connection thing is a new wrinkle.
From
http://www.mail-archive.com/samba@lists.samba.org/msg09052.html (2002)
> > No one is able to edit (in place) documents with Word 2000 on a samba
> > (2.2.6) disk share. A user can open word and save a document to the
> > share, but when they go to edit the document Word says "Word cannot
> > complete the save due to a file permission error". From Microsoft KB
> > Q211632 it appears that Word 2000 performs the following steps to Save an
> > Edited File:
> >
> > 1.) Create a temp file (Create ~wrdxxxx.tmp)
> > 2.) Write temp file (Save example data to ~wrdxxxx.tmp)
> > 3.) Delete original file (Delete EXAMPLE.DOC)
> > 4.) Move temp to target name (Move ~wrdxxxx.tmp to EXAMPLE.DOC)
> >
> > >From examining the samba debug log (attached) it does appear that this
> > happens. It also appears that somewhere in steps 1 and 2 above Word sends
> > a request to turn off the read,write,and execute bits for the owner of the
> > file. When you look at this filesystem after the attempted save the
> > original file does indeed have these bits cleared (i.e. the user has no
> > read,write,or execute permissions on the file), and that I think is why
> > the error is being generated.
*******
From
http://www.mail-archive.com/samba@lists.samba.org/msg21497.html (2003)
Re: R: [Samba] Samba rewrite file's owner
> I've got two group "groupA" and "groupB". My user say "userA" is part of
> "groupA" and "groupB".
> Another user "userB" is part only of "groupB". userB create a file "fileX".
> userA modify this file.
> the final result is that now the fileX is owned by userA with group "groupB"
> and so it's no more
> readable by userB. This conceptually overrides the creator concept that was
> "userB". How can I manage this
> situation in a clear way?
Please, please do some homework before posting this type of request.
The facts, as mentioned many many times on this list is that Microsoft
Word does the following when you modify/change a Word document:
1. Word Creates a NEW document with a temporary name
2. Word then closes the old document and deletes it
3. Word then renames the new document to the original document name
There is NO mechanism by which Samba CAN IN ANY WAY know that the new
document really should be owned by the owners of the original file. Samba
has no way of knowing that the file will be renamed by MS Word.
Precisely HOW would you like the Samba-Team to modify Samba to "preserve"
ownership and permissions? As far as Samba is able to tell, the file that
gets created is a NEW file, not one that the application (Word) that
creates it has open.
There is a work-around to solve the permissions problem. That work-around
involves understanding how you can manage file system behaviour from
within Samba smb.conf configuration, as well as understanding how Unix
file systems work.
In short:
- set on the directory in which you are changing word documents
chmod g+s 'directory_name'
This ensures that all files will be created with the group that owns the
directory.
- in smb.conf share declaration section set:
force create mode = 0660
force directory mode = 0770
These two setting will ensure that all directories and files that get
created in the share will be read/writable by the owner and group.
This is well documented in the Samba-HOWTO-Collection.pdf for Samba-3.0.0
that is available off the Samba web site, that ships with Samba-3.0.0
betas. Refer to chapter 13, in particular a specific example in the Common
Errors section of this chapter.
This should solve your problem.
******
From
http://www.samba.org/samba/docs/man/Samba-HOWTO-Collection/AccessControls.html#id2615334 and referenced in the problem described here
http://infrant.com/forum/viewtopic.php?f=23&t=45048&start=0 (2010)
Question: “When user B saves a word document that is owned by user A, the updated file is now owned by user B. Why is Samba doing this? How do I fix this?”
Answer: Word does the following when you modify/change a Word document: MS Word creates a new document with a temporary name. Word then closes the old document and deletes it, then renames the new document to the original document name. There is no mechanism by which Samba can in any way know that the new document really should be owned by the owners of the original file. Samba has no way of knowing that the file will be renamed by MS Word. As far as Samba is able to tell, the file that gets created is a new file, not one that the application (Word) is updating.
(OP/YesTheBD: The above workaround is then cited.)