1

After Ubuntu upgrade, Libreoffice stops to open files outside home Document folder.

Ubuntu 18.04.5 Libreoffice installed via snap

libreoffice --version
LibreOffice 7.2.0.4 ce769e3009755dcf0082844e386f5dca4c8ecb2f

Trying to call it from console (to see if there is any error messagem):

cd ~
echo "I have full access to the folder" > file.txt
libreoffice.calc file.ods

It halts with a Dialog saying Error dialog

Translated to English: "It was not possible to create a lock file to exclusive access by LibreOffice, by missing permissions to create a lock file on the choosen place"

I've tried to uninstall Libreoffice twice and did multiple attempts via ppa and also from official repository. Same error :(

Libreoffice 6 works fine. The problem just occurs with 7.1 version and above.

I've also tried this solution: askubuntu.com/questions/643382/libre-office-wont-open but the problem persists. In fact, a new config file was not created after I deleted it.

How can I debug to find the permission problem ?

9
  • Please edit your question and add the information in the above comment in your question. The comments are mainly for us to ask for clarifications and point out issues like this. You should update your question.
    – user68186
    Sep 14, 2021 at 21:27
  • Does the problem persist when you open the application directly, instead of from a file? Also, where are these files located, exactly?
    – Nmath
    Sep 14, 2021 at 21:37
  • 1
    Where in the filesystem are you trying to save a file? You lack permission to write to many locations outside your /home/$YOU fir.
    – user535733
    Sep 14, 2021 at 21:45
  • Maybe it's because LibreOffice is installed as snap package. Snap applications can have limited access to filesystem. Try uninstalling snap version of LibreOffice and install regular .deb package version.
    – raj
    Sep 14, 2021 at 21:57
  • Yes. Same problem occurs using GUI. I have full permission to the folder where I'm trying to access.
    – josircg
    Sep 14, 2021 at 22:00

1 Answer 1

0

I had this exact same issue today. I am running Ubuntu 18.04 LTS. I had upgraded from 6.4.7.2 to 7.2.7. This caused two issues. I could not open any file not in my $Home directory and documents I opened in my $Home directory gave me errors. When I tried to save them anywhere other than in Documents it would fail. The files both in $Home and outside of $home were files I had been editing with libre office before the upgrade, and worked after my fix so I can verify I had permissions to them. I tried upgrading to 7.3.5 and that did not fix the issue.

This seems to be related to: https://bugs.launchpad.net/ubuntu/+source/libreoffice/+bug/1751005

I tried sudo apparmor_parser -R /etc/apparmor.d/usr.lib.libreoffice.program.* and it didn't work because it gave me an error I did not try to debug. I also tried updating the alias file but that did not work for me.

In the end I downgraded to 6.4.7.2 and everything is working again. https://downloadarchive.documentfoundation.org/libreoffice/old/6.4.7.2/deb/x86_64/

This is kind of old so hoping this helps anyone new that might come across this in searches.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .