Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Read Only Problem

Status
Not open for further replies.

markstangroom

Technical User
Apr 25, 2001
96
GB
I have a Samba 2.2.8 server which is set up as a Domain Server. It has been running happily for years.
A couple of days ago one of the users has started having intermittent problems where it will not allow him to save or edit files. Windows throws up a message saying the file is already opened by another user.

the home section of my config file is set up like this

# For a specific logon script per machine
logon script = %U/logon.bat
logon drive = H:


[homes]
comment = Home Directories
read only = No
browseable = No
map archive = Yes
guest ok = No

I do not set up individual shares for the users home directory they are automatically mapped to their H drive. But this problem only effects one user the other 100+ are fine.

When I watch smbstatus when he is working it is only opening his files RDONLY where as other users it shows as RDWR.

What could be causing this? Is it a samba problem or a Windows XP problem?

Any help would be appreciated.

Thanks

Mark
 
one further thing i have noticed is that smbstatus was reporting a user logged in at 8am this morning when they had logged off and switched off ther computer 6pm the previous night.

what could be causing this and is it related to the file locking problem i am having?
 
I seem to remember something having to do with the %U
Can you try it without this?


"If you always do what you've always done, you will always be where you've always been."
 
for anyone who ever gets this problem i have found the answer.

It's to do with "OPLOCKS".

If you have oplocks set to yes which is the default with samba it will allow the Windows user to cache a copy of the file they open onto their computer which they can then work on. If the network connection drops even momentarily when the connection is re-established windows will write back the empty file to the server wiping out whatever the user has previously saved. Apparaently it is a major problem with Access databases & Excel. Windows will also think the file is already open when they access the file again because windows does not always dump the cached copy properly.

I have now turned oplocks off and all now seems ok.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top