Locked libreoffice files

Asked by Edward Birbara

Hi

I have accidentally locked files in libreoffice, mainly spreadsheet. As a result I cannot open these files from the directory. All I get is a lock suffix. However I can open these files with another application. Yet I wish to use libreoffoce. However the strange thing is I can open these spreadsheet files from the applications, office, libreoffice route. Your help would be very much appreciated.

Question information

Language:
English Edit question
Status:
Open
For:
Ubuntu libreoffice Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Edward Birbara (handsomeguza) said :
#1

I get the feeling Ubuntu does not believe I am the root user. The root directory in the file system has an 'X' on it. When I double click it states "You do not have the permissions necessary to view the contents of "root".

There are no other users on this PC apart from me. Your expeditious response would be most appreciated

Revision history for this message
Tony Pursell (ajpursell) said :
#2

Hi Edward

I don't quite know what you are getting at.

If you mean the files have a an X on them in the File Browser, then it a matter of access permissions. Just because you are the only user, it doesn't make you the root user. When you log in you are logged in as a normal user. To get root permissions you need to use sudo (in a terminal) or to launch a GUI app with gksu. In either case, you will be asked to confirm the privileged access by giving your password.

If you mean that LO files are locked for editing, then you may have to delete the lock file that was created. It will be in the same folder as the locked file and begins with .lock. Because it begins with a dot, it is treated as a hidden file so you need to use Ctlr-H in the File Broswer to see it.

Hope that helps

Tony

Revision history for this message
Edward Birbara (handsomeguza) said :
#3

Hi Tony

Thank you for your response. i apologise if I was not clear. As it turns out it is only LibreOfficecalc I am having a problem with.

I have accidentally locked three files (calc) as accessed from a personal folder. If I attempt to open the files (within the directory) I am then shown a .lock icon. That is the file (s) is locked for editing by another user. However I am the only user of these files. Further, If i go applications>office>libreofficecalc>open>(filename) the file in question will open and be edited etc. The issue is I cannot open these files any other way which is causing the frustration.

I have looked at permissions for the files to no avail. However I need further clarification on hidden files. Also, I can easily delete the locked file but that does not change anything. I have noticed that when I do work on a file (eg Libreoffice writer), a lock icon appears briefly after saving and then disappears.

I hope I have not rambled on and have been succinct.

Regards

Eddie

Revision history for this message
Edward Birbara (handsomeguza) said :
#4

Hi Tony

Thank you for your response. i apologise if I was not clear. As it turns out it is only LibreOfficecalc I am having a problem with.

I have accidentally locked three files (calc) as accessed from a personal folder. If I attempt to open the files (within the directory) I am then shown a .lock icon. That is the file (s) is locked for editing by another user. However I am the only user of these files. Further, If i go applications>office>libreofficecalc>open>(filename) the file in question will open and be edited etc. The issue is I cannot open these files any other way which is causing the frustration.

I have looked at permissions for the files to no avail. However I need further clarification on hidden files. Also, I can easily delete the locked file but that does not change anything. I have noticed that when I do work on a file (eg Libreoffice writer), a lock icon appears briefly after saving and then disappears.

I hope I have not rambled on and have been succinct.

Regards

Eddie

Revision history for this message
Launchpad Janitor (janitor) said :
#5

This question was expired because it remained in the 'Open' state without activity for the last 15 days.

Revision history for this message
Edward Birbara (handsomeguza) said :
#6

Well it is about time I received some response! I am the one who was waiting to an answer to my question, not the other way round.

For the sake of expediency I will state again my concern. I use Libreoffice calc (3 important files ) on a regular basis. These files are also in a dropbox directory. It was when I was in the dropbox directory that I accidentally locked all 3 of these files. I also noted that the same files were locked in my 'normal' directory that housed these files. Please note that I log in as a user to edit these files. The locked icon can be deleted within the directory without a problem (right click delete).

However I can access these same 3 files from the menu (applications> libreoffice calc >open>(filename). Once the file is open I can edit and save as normal. Yet this cannot be done within the directory (normal place or dropbox). Please also note that it is only applying to Libreoffice calc.

I am less than impressed with the response I received from Tony. I have accessed Launchpad before with another problem and the service was simply outstanding. I would appreciate an expeditious response to this problem

Thank you

Revision history for this message
Paul Stewart (paulbrianstewart) said :
#7

Hi Edward,

I understand it is frustrating not to get an answer quickly, but please remember that folks on this forum trying to help you (myself included) are all volunteers, and are here out of a desire to help. Sometimes we all have other priorities.

In regards to your issue, can you open the files with LibreOffice Calc using the file-open command, and then save as another file name? If so, the new file should not be in the locked state. Then you can delete the other files.

Revision history for this message
Tony Pursell (ajpursell) said :
#8

Hi Edward

I'm sorry you found my previous post was unhelpful. Please understand that we are, like me, mainly volunteer helpers and we do not have access to the full test facilities of a paid for support department. I myself, am on holiday at the moment so have not been able to give as much attention as I usually do to answering questions. If you need it, paid for support is available from Canonical (http://www.canonical.com/consumer-services). Please note that I am not a Canonical employee.

However, I have had the opportunity with another question to look further into LibreOffice file locking. It seems that the hidden file which begins .~lock is a text file that contains the path name to a folder containing another file that also needs to be removed to release the lock. This was confirmed by the person that answered that other question.

Hidden files and folders in Linux are files and folders that have names beginning with a period (or full stop) character. The can be revealed in the File Browser by using the appropriate menu option or with Ctrl-H.

Your problem seems to be related to the use of Dropbox, something that I am not familiar with and unable to test. If this is a clearly reproducible problem, you could report it as a bug. You would do this by using Help > Report a problem in the LibreOffice menu.

Hope that helps

Tony

Revision history for this message
Edward Birbara (handsomeguza) said :
#9

Paul

Thank you for your reply. I have already tried that method but it does not work. The renamed file still won't open in Libre calc. via the directory. All I get is the lock icon which I can easily delete.

This may be a bug in LibreOffice calc.

Eddie

Revision history for this message
Manfred Hampl (m-hampl) said :
#10

In message #6 you mention that you are using Dropbox. Are you sure that it is not Dropbox that is locking the file?

Have you tried the command
lsof <filename>
this should list any process that is locking the file.

Revision history for this message
Edward Birbara (handsomeguza) said :
#11

Manfred

Firstly I am a little confused how to enter this command. Having said that, Dropbox may be locking it but I doubt it. It is simply another directory.

Only Libreoffice calc application is the issue. I can access these calc files from dropbox or for that matter any other directory via the menu.. I did a small test by creating a new calc file. Remember I am logged in as the user. Again when I tried to open this file from a directory the locked icon appeared yet I was able to open the file from the applications menu. Also, I should mention that the # suffix appears on the locked file. This indicates root user if I am correct.

I have logged a bug report about calc. I hope this is not premature.

Many thanks for your swift reply

Eddie

Revision history for this message
Manfred Hampl (m-hampl) said :
#12

I have never used Dropbox myself, so I do not know it's details.

The command that I proposed above is to be run from a terminal
Open a terminal (ctrl-alt-t) and enter the command
"lsof " followed by the filename of the locked file(s)
(e.g. lsof /home/edward/files/calcfile1.ods)

You might also check the file protection settings of the files in question by issuing
ls -l <filename>
to see who the owner of these files is, and what the access rights are.

It seems to me that you misinterpret the '#' suffix. Not everything that is a '#' sign is related to the root user. There is a standard that the command prompt is changed to include a '#' sign when you do a command to elevate your privileges to administrative level, but that is not applicable here.

Revision history for this message
Tony Pursell (ajpursell) said :
#13

Please let us know the number of the bug you have reported so that we can follow it. You can use the 'Link to existing bug' link below.

Tony

Revision history for this message
Manfred Hampl (m-hampl) said :
#14

Edward, I have tried to recap all information in this thread for myself, and I see certain pieces of information that might have been misinterpreted by me. Can you please try to give answers as exact as possible, and provide some more information:

#0: "I have accidentally locked files in libreoffice"
Have you executed an action to lock these files, or is it more "I have not done anything, but now they are locked"?

"All I get is a lock suffix"
What does that exactly mean: have the files been renamed from spreadsheed.ods to spreadsheet.ods.lock ? Is there an additional file (with a name like spreadsheet.ods.lock or .lock.spreadsheed.ods or whatever) created in addition, or ...?

"However I can open these files with another application"
Which which application can you open these files?
Can you (in nautilus) right click on such file, select "open with..." and then select libreoffice calc?

#6: "These files are also in a dropbox directory"
Are the files you are talking about in a directory that is remotely synced with Dropbox? or in another directory? or both?
Does the problem happen only with files in the Dropbox directory?

"The locked icon can be deleted within the directory without a problem (right click delete)."
What exactly can you delete? Is it an additional file? What is its exact name? If it is a file with printable contents, what are the contents?

Can you please open a terminal and issue the commands

cd <directory containing the files>
ls -la

This should list all files (including eventually hidden files that are created for locking purposes) and their access rights.
And please also issue the command

lsof <filename of the locked file>

to see if some other process has created a lock on that file

Revision history for this message
Edward Birbara (handsomeguza) said :
#15

Manfred

I will attempt to answer the questions you have asked

#0 If my memory serves me correctly, I was opening a calc file in dropbox by a double click. The file did not open so I repeated the double click. The result was a locked file icon. This may have happened as dropbox may have been syncronising at the same time. This would suggest that the file was locked by dropbox for syncronising and I endeavoured to interrupt the process. The file ( and subsequently the other calc files) were not renamed.The locked file was named
  .~lock.<filename> . In nautilus, I cannot right click and open with libreoffice. However the file will open with (say) Kspread by a right click.

#6 The files in dropbox are copies of my important files. These files are automatically synced online. Only files in the dropbox folder are synced. They are independent of my 'home' directory. In other words if I work on my 'home' directory and wish to backup these files in the 'cloud', I need to copy and paste these files into dropbox. Once this is done, syncing automatically starts. The alternative is to work exclusively in the dropbox directory. That way the edited files are backed up immediately. However the problem of a locked calc file happens in both the dropbox and 'home' directory. In other words it doesn't matter where a calc file is stored. It will lock (and not open) when double clicked via a directory. I am able to delete the locked file icon.
It can open with notepad eg( Edward Birbara,edward,handsomeguza,21.07.2011 19:29,file:///home/edward/.libreoffice/3;)

Please remember that I can access these calc files via the application menu successfully.

I am having a major problem with the terminal commands that you have stated. Sorry about this

Eddie

Can you help with this problem?

Provide an answer of your own, or ask Edward Birbara for more information if necessary.

To post a message you must log in.