[Solved] Linux Version of OOo Won't Open a File from a NAS

Issues with installing under all GNU/Linux Distributions
Post Reply
User avatar
Mohawk
Posts: 83
Joined: Tue May 31, 2011 8:16 pm

[Solved] Linux Version of OOo Won't Open a File from a NAS

Post by Mohawk »

Running Linux Mint 20.2 and OpenOffice 4.1.10. The problem occurs in Calc and Writer, so I presume it is general across the whole suite.

I have a USB stick plugged into my router which then provides it on the network as a NAS. It's a handy way to share working files between my Windows PC and my Linux PC.

I can open .ods and .odt files directly from the file explorer view in Windows, but if I try to do the same in Linux I get an error message:
General input/output error while
accessing /run/user/1000/gvfs/smb-
share:server=readyshare,share=usb_
storage/<filename>.
It's not that the file is unreadable, or the storage is unwritable, from Linux: if I use a click-and-drag operation to copy the file from the NAS to the desktop, and then double-click the file, it opens in OOo fine. Then I can drag it back to the NAS after editing and it will open in Windows fine (direct from the NAS).

"General input/output error" doesn't say very much. How do we go about tracking down what the actual problem is?
Last edited by Mohawk on Thu Aug 05, 2021 9:08 pm, edited 1 time in total.
OpenOffice 4.1.2 on Win7/64, 4.1.10 Linux Mint 20.3
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Linux Version of OOo Won't Open a File from a NAS

Post by RoryOF »

Many old NAS devices used old protocols and may need to be told to use those. In my rc.local, I mount remote shares using this line adjusted as necessary for folders etc:

mount -t cifs //192.168.2.29/WriterDir -o username=xxxxxx,password=yyyyyyyy,uid=1000,gid=1000,vers=1.0 home/xxxxxx/Desktop/Buffalo_NAS/WriterFiles
 Edit: I forgot to mention that I had to disable OpenOffice making a backup to the NAS device - instead I use timed/dated backup extension. I never investigated why OpenOffice was not permitted by the system to make backups to the NAS device. I simply disabled that, and all is well. 
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Mohawk
Posts: 83
Joined: Tue May 31, 2011 8:16 pm

Re: Linux Version of OOo Won't Open a File from a NAS

Post by Mohawk »

RoryOF wrote:I forgot to mention that I had to disable OpenOffice making a backup to the NAS device - instead I use timed/dated backup extension. I never investigated why OpenOffice was not permitted by the system to make backups to the NAS device. I simply disabled that, and all is well.
Didn't help.
RoryOF wrote:Many old NAS devices used old protocols and may need to be told to use those. In my rc.local, I mount remote shares using this line adjusted as necessary for folders etc:

mount -t cifs //192.168.2.29/WriterDir -o username=xxxxxx,password=yyyyyyyy,uid=1000,gid=1000,vers=1.0 home/xxxxxx/Desktop/Buffalo_NAS/WriterFiles
I have told Linux to allow SMB1 in the smb.conf. Before that I couldn't see the contents of the NAS at all.

I fail to see why an app should have any knowledge of the intricacies of accessing a file - isn't that supposed to be delegated to the OS? For example: a plain text editor opened the file no trouble at all (invalid characters notwithstanding).
OpenOffice 4.1.2 on Win7/64, 4.1.10 Linux Mint 20.3
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: Linux Version of OOo Won't Open a File from a NAS

Post by RoryOF »

As far as I remember I told Samba to use SMB1, as well as setting Ver1 (as I showed) in rc.local. As to why OpenOffice needs to know that, it may be a side effect of the network module used - once I got it working I went back to doing some work rather than digging into the entrails of OpenOffice.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Mohawk
Posts: 83
Joined: Tue May 31, 2011 8:16 pm

Re: Linux Version of OOo Won't Open a File from a NAS

Post by Mohawk »

After some playing around, I have managed to reproduce your results using:

Code: Select all

mkdir /home/<usr>/NAS
sudo -i
mount -t cifs //<IP address of router hosting the USB drive>/USB_Storage -o username=admin,password=<password>,uid=1000,gid=1000,vers=1.0 /home/<usr>/NAS
Note that "USB_Storage" is the router's default path to the storage.

Double-clicking the contents shown in Nemo (Files) in /home/<usr>/NAS then opens OpenOffice and loads the file correctly.

Now I have established a baseline, I can see whether there are any optimisations to be made. It is not ideal, for example, to store my router's admin password in plaintext in a startup script!

I still think the fact that OpenOffice won't open a file from the NAS when it is simply mounted in Nemo, when other apps can, is a bug in OpenOffice. I will have to try reverting to Libre and see whether that is the same - watch this space.
OpenOffice 4.1.2 on Win7/64, 4.1.10 Linux Mint 20.3
User avatar
RoryOF
Moderator
Posts: 34613
Joined: Sat Jan 31, 2009 9:30 pm
Location: Ireland

Re: [SOLVED] Linux Version of OOo Won't Open a File from a N

Post by RoryOF »

One can use a Credentials file, visible only to root.

Details are at
https://askubuntu.com/questions/130762/ ... d-in-fstab

https://somoit.net/linux/mounting-windo ... -via-fstab

There may be other threads to the same effect - I haven't checked.
Apache OpenOffice 4.1.15 on Xubuntu 22.04.4 LTS
User avatar
Mohawk
Posts: 83
Joined: Tue May 31, 2011 8:16 pm

Re: [Solved] Linux Version of OOo Won't Open a File from a N

Post by Mohawk »

It appears this is sufficient:

Code: Select all

mount -t cifs //<IP address of router hosting the USB drive>/USB_Storage -o password=,vers=1.0 /home/<usr>/NAS

Also, replacing "password=" with "guest" works too. A similar command can be added to fstab so that the NAS storage is available on the desktop after boot. Hope this helps somebody.
OpenOffice 4.1.2 on Win7/64, 4.1.10 Linux Mint 20.3
Post Reply