• April 24, 2024, 03:28:45 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Pages: [1] 2

Author Topic: Lost Network Connection = File Lockout?  (Read 14585 times)

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Lost Network Connection = File Lockout?
« on: February 15, 2011, 12:27:35 PM »

My DNS-323 works flawlessly for me except for one really big thing...

While working in an MS Office 2003 file stored on my DNS-323, if I lose or break my network connection, I am locked out of that file when I reestablish the connection.

In Word, for instance, after the connection is broken and reestablished, if I try to save the file again, I get the error: "Word cannot complete the save due to a file permission error." (followed by the path and file name of the file).

If I exit Word and try to rename the file from Windows Explorer, I get the message: "Cannot rename <filename>: It is being used by another person or program. Close any programs that might be using the file and try again."  After a period of about 10 minutes, if I do nothing at all, I can rename the file.

This problem is especially frustrating since I work wirelessly a lot and lose my connection (very briefly) a couple of times per hour. 

The problem seems to be unique to MS Office files.  It does not occur when working with files, for instance, in Notepad or MS Paint.

I can replicate the problem at will by manually disabling and enabling the connection.  Breaking a wired connection has the same effect.

I am running several XP Pro machines and the problem occurs on all of them.  Also, when I get locked out of a file, I am locked out on all of the machines.

All the XP machines have the same username (and no password).  The NAS does not have any users set up.

The problem existed on DNS-323 firmware 1.04 and still exists on 1.09.  I have not fun-plugged the NAS.

Router firmware is the latest Tomato.  I have a second router (also Tomato) acting as a wireless ethernet bridge to which the NAS is connected.

Thanks a ton in advance to anyone who can give an explanation or fix.
Logged

fordem

  • Level 10 Member
  • *****
  • Posts: 2168
Re: Lost Network Connection = File Lockout?
« Reply #1 on: February 15, 2011, 12:59:05 PM »

Have you considered fixing the original problem rather than trying to find a work around?  Why are you having a dropped connection.
Logged
RAID1 is for disk redundancy - NOT data backup - don't confuse the two.

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Lost Network Connection = File Lockout?
« Reply #2 on: February 15, 2011, 01:17:13 PM »

I'm not sure about this, but it's worth a shot: under network access, you can try and change the share setting Oplock option.
You can read more about it here:
http://www.smallnetbuilder.com/nas/nas-features/30039-nas-tutorial-oplocks-and-nases
http://www.superbase.com/services_tech_support_oplocks.htm
« Last Edit: February 15, 2011, 01:18:45 PM by scaramanga »
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

fordem

  • Level 10 Member
  • *****
  • Posts: 2168
Re: Lost Network Connection = File Lockout?
« Reply #3 on: February 15, 2011, 01:20:23 PM »

Be warned - an incorrect oplock setting in a multi-user environment can lead to file corruption and data loss.  The risk of creating additional problems with that work around is very high - fix the root cause of the problem, your network infrastucture has a serious problem, deal with it and get it done with.
Logged
RAID1 is for disk redundancy - NOT data backup - don't confuse the two.

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Re: Lost Network Connection = File Lockout?
« Reply #4 on: February 15, 2011, 01:39:45 PM »

scaramanga,

Thanks for the suggestion.  Yesterday, I tried switching the oplocks from "No" to "Yes" and it didn't make a difference.  However, after making that switch, I did not reboot the NAS (maybe this is necessary?) so I think I will try it again with a reboot just in case (and with Fordem's caveat in mind).  I'll let you know if it works.

Fordem,
I've worked on the wireless connectivity issue a fair bit and have concluded that these drops in my wireless connection are an unfortunate fact of life in my house, especially in one room that I work in.
Logged

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Lost Network Connection = File Lockout?
« Reply #5 on: February 15, 2011, 01:55:58 PM »

You can try Tomato's wireless survey if you haven't already. Might help you find a channel with less interference.
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Re: Lost Network Connection = File Lockout?
« Reply #6 on: February 15, 2011, 03:31:49 PM »

scaramanga,

Changing the oplocks to "yes" and an NAS reboot didn't make any difference.

As to finding the clearest channel, I've done that (and several other things like adjusting router transmit power and tweaking my wireless adapter settings).  I probably have the best wireless connectivity I'm going to have in this old house without bringing in additional equipment.  And even if I do that, I'm far from sure that I'd eliminate the drops.

It seems odd that such a common and usually trivial event as dropping a wireless connection would always cause the major headache of getting locked out of any open MS Office file.  I have to imagine that I've got something set up wrong (or not set up that should be) in XP, MS Office or on the NAS.  For as much as I know, the answer could be pretty basic.

Thanks a million for any light you can shed.
Logged

fordem

  • Level 10 Member
  • *****
  • Posts: 2168
Re: Lost Network Connection = File Lockout?
« Reply #7 on: February 15, 2011, 05:56:02 PM »

It seems odd that such a common and usually trivial event as dropping a wireless connection would always cause the major headache of getting locked out of any open MS Office file.  I have to imagine that I've got something set up wrong (or not set up that should be) in XP, MS Office or on the NAS.  For as much as I know, the answer could be pretty basic.

Thanks a million for any light you can shed.

First - on the dropped wireless connections...

You're running the tcp/ip suite of protocols, designed to be self healing, and to withstand a nuclear attack, it actually takes either a woefully poor connection or an extremely high level of errors to result in a dropped connection.

Common - it may be, trivial - certainly not.

Second - on the file lock out.

Microsoft Office is designed to work in a multi-user environment, a file opened by one user is locked to prevent it from being simultaneously opened by a second user, this is done to prevent corruption and loss of data - imagine what would happen if user_1 opened a spreadsheet containing sales figures for the month to add yesterday's sales, whilst user_2 had it open to change the mark up - whoever saves the file first will have his/her changes overwritten when the other user makes his/her save.

If the file is properly closed, the lock is released but if the connection is dropped, it remains locked - this is the cause of your problem.
Logged
RAID1 is for disk redundancy - NOT data backup - don't confuse the two.

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Re: Lost Network Connection = File Lockout?
« Reply #8 on: February 15, 2011, 07:01:40 PM »

Fordem,

Thanks.  I understand all that you've said.

Once the connection is dropped, the lock remains, sure.  But once the connection is reestablished, you would think that this lock would not lock out the same user who opened the file, is still on the same computer, in the same session of the application, and even when no changes to the file have been made during the loss of connectivity.

In fact, when I use Computer X to open a MS Office file on a network share on Computer Y, then break Computer X's network connection, I am not locked out of the file in any regard when the connection is reestablished.  The lockout problem only happens if the file is on the DNS-323.
Logged

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Lost Network Connection = File Lockout?
« Reply #9 on: February 16, 2011, 01:47:30 AM »

In fact, when I use Computer X to open a MS Office file on a network share on Computer Y, then break Computer X's network connection, I am not locked out of the file in any regard when the connection is reestablished.  The lockout problem only happens if the file is on the DNS-323.
If that's the case, then I'm guessing the problem lies with the smb server. From here, it seems, you have a couple of options, both require installing fun-plug:
1. try to tweak the smb.conf file. If you figure it out that way, you can make your changes permanent by writing a script that modifies smb.conf when the DNS-323 boots.
2. Replace smb.d. There's a samba package in Fon'z repository. Maybe a different (newer?) smb server doesn't suffer from this bug.
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Re: Lost Network Connection = File Lockout?
« Reply #10 on: February 16, 2011, 02:24:21 PM »

scaramanga,

I think you're right.  There must be an issue with the smb server--maybe something interactional with the way MS Office tries to do its locks.

The fact that the lock expires 10 minutes after Office has quit says something--but I don't know what.

Maybe I don't have Windows properly configured with respect to oplocks.  I was kinda poking around / researching that last night.

I don't relish going under the DNS-323's hood.  I'm already out of my depth.

FWIW, I created a user acct on the NAS with the same username and password as on all my machines, but it didn't make any difference.
Logged

scaramanga

  • Level 2 Member
  • **
  • Posts: 99
Re: Lost Network Connection = File Lockout?
« Reply #11 on: February 17, 2011, 12:41:54 AM »

The 1.10 FW version is on its way, it seems. If seems that D-Link is more active on this forum than here. You can ask your question there.
Logged
DNS-323 HW Rev. C1 FW 1.08 fun_plug 0.5
2 x Western Digital WD10EARS-00Y5B1 in Standard mode
(LLC changed to 5 minutes. Partitions aligned to 4K boundary)

Biscotte

  • Level 2 Member
  • **
  • Posts: 41
Re: Lost Network Connection = File Lockout?
« Reply #12 on: February 17, 2011, 05:44:37 AM »

No guarantees here but the locks that all the m$oft documents that i produce look like this:

File name
"assessment summary.DOC"

Lock the document name
"~$sessment summary.DOC"

This is a 162 byte file with read only and hidden file attributes. 
Most people dont see this as their IT admin people set up systems so that they do not show hidden files. 

Once you delete this (example above) ~$sessment summary.DOC file, you can do what you like with the document it refers to / it controls the opening of.  It has worked since before word 97, on 2003 and 2007 that i know of. 

In short kill the corresponding 162 byte file and you are back in business. 

Last obvious comment - dont kill the other ~$xxx.doc files, they are keeping the system honest. 
Logged

ChosenGSR

  • Guest
Re: Lost Network Connection = File Lockout?
« Reply #13 on: February 17, 2011, 05:51:39 AM »

I think I got the same issue but without using Microsoft Word.  I tried installing something on my laptop directly from the NAS, however my laptop froze and I rebooted it.  I tried deleting the file from another laptop and it says that another system is holding a lock on it.
Logged

YesTheBD

  • Level 1 Member
  • *
  • Posts: 13
Re: Lost Network Connection = File Lockout?
« Reply #14 on: February 17, 2011, 12:34:19 PM »

scaramanga,
Thanks again--which forum are you referring to?


Biscotte,
While trying to troubleshoot this problem, I found that these MS Word ~$ owner files are only created when the file is opened on a local drive.

These files are not created (anywhere) when the file that's open is on the DNS-323 or a share on another XP computer.   The locking must be handled differently when a network file is involved.

(This contradicts what MS says about owner files on network drives here: http://support.microsoft.com/kb/211632.)

When you open a MS Word file on your NAS, is a ~* owner file created?

Thanks for your help.
Logged
Pages: [1] 2