Started getting "file locked for editing" messages
Started getting "file locked for editing" messages
I have been using Open Office 3 on a dual boot Ubuntu 10/Vista setup with files on a shared nfs data partition. Until last week I was able to access files edited by my User role or by root on either system. Starting a few days ago I can not change systems or user without getting a "file locked for editing" message. This occurs even if I set Linux permissions to 777. What is the easiest way to reset Open Office to allow access the way it did until a few weeks ago.
Thanks for your suggestions
Thanks for your suggestions
Open Office 3.2 on Ubuntu 10
Vista dual boot
Vista dual boot
Re: started getting "file locked for editing" messages
You have no write access to any file so this issue has nothing to do with OpenOffice.org. Are the Ubuntu forums down?
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Started getting "file locked for editing" messages
I have normal read and write access to all files except for OpenOffice files that are locked for editing.
I can still open and edit any OpenOffice Document that was created last year. I can edit these older document Vista or Ubuntu, and it does not matter how I am logged in. I want to the have the kind of access to all my OpenOffice docs.
I did not change anything, so I expect that recent automatic updates made the change. Perhaps the change is part of an nfs file system update in Ubuntu, but there are also OpenOffice settings that could be involved.
Is there a setting in Open Office that could give all users permission to edit a file and not just the user that created it?
Villeroy's sarcastic comment "are the Ubuntu forums down" inspire no confidence in your forum and and are a bad reflection on OpenOffice.
I can still open and edit any OpenOffice Document that was created last year. I can edit these older document Vista or Ubuntu, and it does not matter how I am logged in. I want to the have the kind of access to all my OpenOffice docs.
I did not change anything, so I expect that recent automatic updates made the change. Perhaps the change is part of an nfs file system update in Ubuntu, but there are also OpenOffice settings that could be involved.
Is there a setting in Open Office that could give all users permission to edit a file and not just the user that created it?
Villeroy's sarcastic comment "are the Ubuntu forums down" inspire no confidence in your forum and and are a bad reflection on OpenOffice.
Open Office 3.2 on Ubuntu 10
Vista dual boot
Vista dual boot
- Hagar Delest
- Moderator
- Posts: 33691
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Started getting "file locked for editing" messages
Has the Windows session been closed without hibernation? Perhaps the file is still locked because the file hasn't been closed in the Windows session. In that case, you should see a #filename.lock file (or something like that) in the folder containing the file.
Try to use a FAT32 partition for sharing documents between the 2 OSs. Perhaps there is a glitch with the nfs driver under Ubuntu.
Try to use a FAT32 partition for sharing documents between the 2 OSs. Perhaps there is a glitch with the nfs driver under Ubuntu.
We are users like you here, nobody belongs to the OOo team. So some users may have their own language to tell that the problem is more linked to an OS problem than an OOo one...bobnw wrote:Villeroy's sarcastic comment "are the Ubuntu forums down" inspire no confidence in your forum and and are a bad reflection on OpenOffice.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Re: Started getting "file locked for editing" messages
menu:File>Properties... shows the location of the current read-only file.
Is that really your home directory?
Do you really have write access to that file?
Is there a hidden lock file from a crashed session? Typical name is like .~lock.myfile.ods#
Is that really your home directory?
Do you really have write access to that file?
Is there a hidden lock file from a crashed session? Typical name is like .~lock.myfile.ods#
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
Re: Started getting "file locked for editing" messages
I to am getting this message. I go where the network lets me get coverage so am using laptops with vista, xp and windows 7. It.s only just started.
Open office 3.1.1
Windows XP
Windows XP
Re: Started getting "file locked for editing" messages
Search for and delete files named .~lock.
Edit:
corrected lock file naming.
Edit:
corrected lock file naming.
Tom K.
Windows 11 24H2
LibreOffice
Windows 11 24H2
LibreOffice
-
mjverostek
- Posts: 2
- Joined: Fri Sep 02, 2011 8:35 pm
Re: Started getting "file locked for editing" messages
The network resource accessing the file did not disconnect properly.
The following file is present:
.~lock.[filename_full]#
It contains the following information:
,[COMPUTERNAME]/[username],[computername],[date] [time],[locking_process_location];
This can happen when the locking process is unexpectedly terminated while the resource is still allocated.
Attempt to deallocate the resource from the locking process by ensuring the process is running, ensuring that it has the resource allocated, then manually deallocating the resource from the process.
Or just make sure the process is terminated and delete the following file:
.~lock.[filename_full]#
The following file is present:
.~lock.[filename_full]#
It contains the following information:
,[COMPUTERNAME]/[username],[computername],[date] [time],[locking_process_location];
This can happen when the locking process is unexpectedly terminated while the resource is still allocated.
Attempt to deallocate the resource from the locking process by ensuring the process is running, ensuring that it has the resource allocated, then manually deallocating the resource from the process.
Or just make sure the process is terminated and delete the following file:
.~lock.[filename_full]#
OpenOffice 3.2.0 Portable on Windows XP
LibreOffice on LMDE
LibreOffice on LMDE
-
mjverostek
- Posts: 2
- Joined: Fri Sep 02, 2011 8:35 pm
Re: Started getting "file locked for editing" messages
Basically, run OpenOffice from the computer that locked it under the user that locked it, open the file and then close the file. The .~lock.[filename_full]# file should be deleted by the process when you close it.
This usually happens when some jack ass just presses the power button on their computer instead of shutting it down properly and it screws up file access for everyone on the network.
I even attempted to restart Samba and no luck.
DON'T DELETE THIS FILE YOURSELF
~~~
So get your netadmin to check to see if the computer that locked the file is active on the network and if not have them delete the .~lock.[filename_full]# file.
If you try to delete it yourself you may screw up a valid resource allocation. Someone may legitimately be using that file, or it may become corrupted. If you can't get a hold of a network administrator then simply copy the file and work off of that.
~~~
DON'T DELETE THIS FILE YOURSELF
This usually happens when some jack ass just presses the power button on their computer instead of shutting it down properly and it screws up file access for everyone on the network.
I even attempted to restart Samba and no luck.
DON'T DELETE THIS FILE YOURSELF
~~~
So get your netadmin to check to see if the computer that locked the file is active on the network and if not have them delete the .~lock.[filename_full]# file.
If you try to delete it yourself you may screw up a valid resource allocation. Someone may legitimately be using that file, or it may become corrupted. If you can't get a hold of a network administrator then simply copy the file and work off of that.
~~~
DON'T DELETE THIS FILE YOURSELF
OpenOffice 3.2.0 Portable on Windows XP
LibreOffice on LMDE
LibreOffice on LMDE
Re: Started getting "file locked for editing" messages
Sometimes, a timing glitch can happen that causes such a file to be created when it shouldn't have been. This has nothing to do with user error. I've seen this file before. Windows 7 does have a mechanism that usually pauses the shutting down process in order to correctly close the file such that the locking of it is reversed. However, sometimes, for whatever reason, this does not happen. Also, depending on where a file is saved, windows will lock the file.mjverostek wrote:Basically, run OpenOffice from the computer that locked it under the user that locked it, open the file and then close the file. The .~lock.[filename_full]# file should be deleted by the process when you close it.
This usually happens when some jack ass just presses the power button on their computer instead of shutting it down properly and it screws up file access for everyone on the network.
What I've had to do is...
right click on file
click on security tab
click EDIT button
change permissions
Click Apply
then Ok
Depending on where this file is, I've had to do this several times before Windows actually accepted the changes. I was changing permissions on a Skins Folder so I could change all the images and files.
Hope this helps someone.
OpenOffice 3.3
Windows 7, 64-bit computer, 8GB RAM
Windows 7, 64-bit computer, 8GB RAM
Re: Started getting "file locked for editing" messages
This seems to happen to OOO files with a .doc extension. MSWord claims ownership and designates the files as read only. Entering Task Manager and ending the process for WINWORD will allow temporary control. Expunging MS Word from your system should eliminate the problem. Better yet, save the file in .ods -- no problem.
OpenOffice.org 3.3.0
OOO3330m20 (Build:9567)
Win7 Home Premium 64 bit
OOO3330m20 (Build:9567)
Win7 Home Premium 64 bit
Re: Started getting "file locked for editing" messages
MS Word does not designate files as read-only. "File locked for editing" means that the file is already open for editing or wasn't properly closed before opening with Writer. If a file is already open in MS Word and is subsequently opened with Writer before being closed in Word, Writer will let the user open the file "read-only". Removal of MS Word just eliminates the possibility that the user will try to open a file in both MS Word and Writer at the same time.esarah wrote:This seems to happen to OOO files with a .doc extension. MSWord claims ownership and designates the files as read only. Entering Task Manager and ending the process for WINWORD will allow temporary control. Expunging MS Word from your system should eliminate the problem. Better yet, save the file in .ods -- no problem.
- kingfisher
- Volunteer
- Posts: 2127
- Joined: Tue Nov 20, 2007 10:53 am
Re: Started getting "file locked for editing" messages
If the lock file is still there after you close the document file, delete the lock file.
Apache OpenOffice 4.1.12 on Linux
-
Cellular-Decay
- Posts: 1
- Joined: Sun Feb 19, 2012 5:58 am
Re: Started getting "file locked for editing" messages
Wow, this question has been here for nearly a year, and EVERYONE got the answer WRONG!bobnw wrote:I have been using Open Office 3 on a dual boot Ubuntu 10/Vista setup with files on a shared nfs data partition. Until last week I was able to access files edited by my User role or by root on either system. Starting a few days ago I can not change systems or user without getting a "file locked for editing" message. This occurs even if I set Linux permissions to 777. What is the easiest way to reset Open Office to allow access the way it did until a few weeks ago.
Thanks for your suggestions
I'm surprised, because this is a well known and very common issue with Open Office. The problem is NOT the OS, it's NOT the file permissions, it's NOT the lock file, and it is ABSOLUTELY the fault of Open Office.
Sometime in the development of OO, some idiot programmer decided that all files on NFS shares should be locked by default. I have no idea who the ass-hat was, or how this moronic decision got pushed to the release version, but to fix it you have to edit the soffice script and comment out the expression that enables locking on NFS shares. What you are looking for is the section that looks like this (from v3.2, may vary with other versions):
Code: Select all
# adjust environment
#
#if [ -z "$SAL_ENABLE_FILE_LOCKING" ]; then
# case "$FILE_LOCKING" in
# auto)
# home_on_nfs "$@"
# if [ $? = 0 ]; then
# STAR_PROFILE_LOCKING_DISABLED=1
# export STAR_PROFILE_LOCKING_DISABLED
# fi
# file_on_nfs "$@"
# if [ $? = 0 ]; then
# SAL_ENABLE_FILE_LOCKING=0
# export SAL_ENABLE_FILE_LOCKING
# # for safety
# STAR_ENABLE_FILE_LOCKING=
# export STAR_ENABLE_FILE_LOCKING
# else
# # file locking now enabled by default
# SAL_ENABLE_FILE_LOCKING=1
# export SAL_ENABLE_FILE_LOCKING
# fi
# ;;
# yes)
# SAL_ENABLE_FILE_LOCKING=1
# export SAL_ENABLE_FILE_LOCKING
# ;;
# no)
# SAL_ENABLE_FILE_LOCKING=0
# export SAL_ENABLE_FILE_LOCKING
# # for safety
# STAR_ENABLE_FILE_LOCKING=0
# export STAR_ENABLE_FILE_LOCKING
# STAR_PROFILE_LOCKING_DISABLED=1
# export STAR_PROFILE_LOCKING_DISABLED
# esac
#fiThe soffice script is usually found in /usr/bin/, or /usr/lib/openoffice/program/
OOO v3.xx (varies, depending on OS). Windows XP & 7, Linux Mint-10 & Crunchbang Statler
-
tapani.ruohola
- Posts: 4
- Joined: Tue Apr 16, 2013 11:09 am
Re: Started getting "file locked for editing" messages
Gents,
I do have this annoying fault with my Win7 & OpenOffice 3.4.1 environment.
You advise to fix some script which should be found in:
"The soffice script is usually found in /usr/bin/, or /usr/lib/openoffice/program/"
I can't find any of those in my environment, somehow I doubt they are Linux paths?
What is the exact file name?
Please advise how to fix the bug in Win7 environment
rgds
tapsa
I do have this annoying fault with my Win7 & OpenOffice 3.4.1 environment.
You advise to fix some script which should be found in:
"The soffice script is usually found in /usr/bin/, or /usr/lib/openoffice/program/"
I can't find any of those in my environment, somehow I doubt they are Linux paths?
What is the exact file name?
Please advise how to fix the bug in Win7 environment
rgds
tapsa
OpenOffice 3.4.1 on Windows 7
- Hagar Delest
- Moderator
- Posts: 33691
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Started getting "file locked for editing" messages
Before messing with such configuration files, do you face this problem with all your files or just some?
Are the files on your HD or on a network?
Are the files on your HD or on a network?
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
-
tapani.ruohola
- Posts: 4
- Joined: Tue Apr 16, 2013 11:09 am
Re: Started getting "file locked for editing" messages
Thanks for the very prompt response !
I'm using a stand-alone PC, all files are on the HD.
This is how I end up in trouble:
1. Create & save a xyz.xml file, a lock file for it will appear in the folder
2. Save it as Word97 xyz.doc (a lock file for this file also appears in the folder) and close it.
3. Both lock files disappear but you can't access the .xml file, it is "locked for editing by Unknown User". The .doc file is ok.
4. Usually PC restart/boot releases the .xml lock.
Why then I use .xml files? I do have an genealogy application that produces such files (and no other usable format).
Any advices ? Thanks in advance!
I'm using a stand-alone PC, all files are on the HD.
This is how I end up in trouble:
1. Create & save a xyz.xml file, a lock file for it will appear in the folder
2. Save it as Word97 xyz.doc (a lock file for this file also appears in the folder) and close it.
3. Both lock files disappear but you can't access the .xml file, it is "locked for editing by Unknown User". The .doc file is ok.
4. Usually PC restart/boot releases the .xml lock.
Why then I use .xml files? I do have an genealogy application that produces such files (and no other usable format).
Any advices ? Thanks in advance!
OpenOffice 3.4.1 on Windows 7
Re: Started getting "file locked for editing" messages
I've tried this. On my system, as soon as the file is Saved As in some other format, the lock file for that format is deleted and a new lock file created for the new format. It can take some seconds for the file information to propagate, so immediately trying to open the other format can encounter the lock, but normal speed in reopening should allow the lock to clear.
Incidently, best to work in .odt fomat than in .doc format.
Incidently, best to work in .odt fomat than in .doc format.
Apache OpenOffice 4.1.16 on Xubuntu 26.04.1 LTS
- Hagar Delest
- Moderator
- Posts: 33691
- Joined: Sun Oct 07, 2007 9:07 pm
- Location: France
Re: Started getting "file locked for editing" messages
Do you have the quickstarter active (AOO icon in the system tray, next to the clock)?
If so, close it. Have you tried to wait for some time (without rebooting)? I think I remember some similar topics here about files not released completely. But not sure if it comes from AOO or from the OS.
If so, close it. Have you tried to wait for some time (without rebooting)? I think I remember some similar topics here about files not released completely. But not sure if it comes from AOO or from the OS.
LibreOffice 25.2 on Linux Mint Debian Edition (LMDE 7 Gigi) and 25.2 portable on Windows 11.
Re: Started getting "file locked for editing" messages
Yes, Hagar, you remember correctly. The Quickstarter was blamed for holding some Base/database files open; it had to be closed before the changes were committed. Perhaps the .xml file is similarly affected. My test was on Ubuntu with no Quickstarter.
Apache OpenOffice 4.1.16 on Xubuntu 26.04.1 LTS
-
tapani.ruohola
- Posts: 4
- Joined: Tue Apr 16, 2013 11:09 am
Re: Started getting "file locked for editing" messages
Gents,
The same problem appears with .odt also, it seems to be the "save as" in other format?
I do not have the quickstarter active.
I have been waiting, a locked file stays locked until restart, you can't delete it even in dos-box . . .
Please read carefully what I wrote: the lock file DISAPPEAR but the .xml file remains locked.
Still waiting for a working hint . . . anybody who knows where that script is located in Win7 system . . . ?
rgds tapsa
The same problem appears with .odt also, it seems to be the "save as" in other format?
I do not have the quickstarter active.
I have been waiting, a locked file stays locked until restart, you can't delete it even in dos-box . . .
Please read carefully what I wrote: the lock file DISAPPEAR but the .xml file remains locked.
Still waiting for a working hint . . . anybody who knows where that script is located in Win7 system . . . ?
rgds tapsa
OpenOffice 3.4.1 on Windows 7
Re: Started getting "file locked for editing" messages
If the lock file has disappeared, then the lock is most probably being applied, not by OpenOffice, but by the Operating System. You may need to use a system level utility to find what properties the .xml file has, which may lead you towards a resolution of the problem.tapani.ruohola wrote:Please read carefully what I wrote: the lock file DISAPPEAR but the .xml file remains locked.
Apache OpenOffice 4.1.16 on Xubuntu 26.04.1 LTS
-
tapani.ruohola
- Posts: 4
- Joined: Tue Apr 16, 2013 11:09 am
Re: Started getting "file locked for editing" messages
Hmm . . . a Win7 problem says a Unix man(?) , , , chicken existed before egg . . . please advice the referenced "system level utility" in Win7RoryOF wrote: You may need to use a system level utility to find what properties the .xml file has, which may lead you towards a resolution of the problem.
OpenOffice 3.4.1 on Windows 7
Re: Started getting "file locked for editing" messages
There are a number of very powerful debugging tools for Windows at www.sysinternals.com; it is so long since I used one that I cannot reliably remember the name of the tool I used. I understand that they have been taken over by Microsoft, but last time I checked their site was running (perhaps aliased to an MS Server).
Apache OpenOffice 4.1.16 on Xubuntu 26.04.1 LTS
-
webmartphoto
- Posts: 1
- Joined: Mon Feb 09, 2015 4:42 pm
Re: Started getting "file locked for editing" messages
When computer crashes or has a power failure there is a hidden file created in the same folder of the document: .~lock.DOCNAME.doc#
Just close your open files and in the same folder of your doc click in the upper left "organize" and chhose "Folder and search options" choose the tab "View" and under "hidden files and folders" choose "Show hidden files, folders, and drives"
Then you'll see the file that is locking your doc.
Just delete it.
Choose back "don't show hidden files, folders, and drives"
Now you can open your file normally again.
Just close your open files and in the same folder of your doc click in the upper left "organize" and chhose "Folder and search options" choose the tab "View" and under "hidden files and folders" choose "Show hidden files, folders, and drives"
Then you'll see the file that is locking your doc.
Just delete it.
Choose back "don't show hidden files, folders, and drives"
Now you can open your file normally again.
OpenOffice 4.1.0
Re: Started getting "file locked for editing" messages
Do not delete the .~Lock.[filename] file until AFTER creating a copy and saving it under a new name. Some people end up destroying the contents of the document and it's always best to save the file in question after each of YOUR sessions with it under the new file, this ensures you have an active backup if this problem does occur or if deleting the Lock file ruins the document in question. At least saving a copy of the file retains the original document for copy and pasting or for complete replacement. The Lock file MUST be deleted or any file with the same name will also become corrupt.
Hope this helps for anyone who did not get the opening/closing the original file to actually work as someone else suggested. It might work for some people but failed to work for me.
Hope this helps for anyone who did not get the opening/closing the original file to actually work as someone else suggested. It might work for some people but failed to work for me.
OpenOffice 4.0.1 on Windows 7
Re: Started getting "file locked for editing" messages
I opened 'read-only' PPT file and 'save-as' a different name then deleted the read-only file.
I can edit the new file I created using save-as above.
Maybe I hibernated the Windows 10 laptop instead of closing files then logging out.
I can edit the new file I created using save-as above.
Maybe I hibernated the Windows 10 laptop instead of closing files then logging out.
Dwight Walker
OpenOffice 4.1.5 on Windows 7
OpenOffice 4.1.5 on Windows 7