Files on remote shares are always read-only

Whenever I try to open a file on a remote share it only allows the file to be opened read-only.

This seems to be a “by design” thing? It’s been like this for years but I’ve never bothered asking about it till now.

Is there a setting I am missing to disable this?

Over the years it’s been like this on Windows, Mac, and Linux clients; nfs, smb, afp, and sshfs protocols; ext4, ext3, afs, etc. filesystems regardless of the server or client configuration.

Today I’m running Linux trying to remote open a file on another host over sshfs. Sure, I could copy it locally like I’ve always done but then you have multiple copies of different versions of the same file spread across a bunch of different machines - defeats the whole purpose of a centralised file share.

Is there a fix for this? Am I blind when looking in the preferences? Am I “doing it wrong”?

If not, is it possible to open a bug report or feature request or something?

Surely over the years I’m not the first person to ask about this? My search-fu locally or on ddg or google doesn’t seem to bring up much.

Any insights appreciated.

EDIT 2023-02-26 by ajlittoz

Since this old question seems to be revived, I retagged it to better reflect its object.

1 Like

Access rights are governed by the server. If the server grants read-only access, no client software will be able to write any file. You have the same problem with any other software trying to write files on that share.

I have not administered networks for quite some time already; but back then, before I started to develop LibreOffice, I administered a Windows network on my organization, where it used a Windows domain, with shares working nicely with LibreOffice.

You need to be more specific. It’s definitely not “any share with any protocol doesn’t work with any LO version on any host’”.

@Villeroy. This is centainly not relevant to the case. I set the permissions to 777 on one .docx file on a computer on my local network and still can only only open it in LIbreOffice Writer for Ubuntu Linux via AFP on another computer on the network in read-only mode. This behaviour is specific to LIbreOffice programs. With other programs like TextEdit, the similar works smoothly.

This is not enough.
When a file is opened for writing, LO creates a hidden file in the same folder named .~lock.yourFile.docx#.
If there is no permission to do so, the file will be opened as read-only.

2 Likes

@sokol92 I do not see that file appearing anywhere, and I am not even allowed to open the file for writing. The frist thing I get when I attempt to open the file is a notice with the text: “Document in use, Document file … is locked for editing by: Unknown User”. I am then offered the choice betwen “Open Read-Only”, “Notify”, “Open Copy”, “Cancel”. This notice occupies the entire screen and cannot be shrunk. I can check that the file is not in use on the host computer, and locally, it is just about to be opened. When I look up the remote file specifications, I see myself as the owner. The behaviour is the same on another host which I access by SFTP. I can easily create from the client computer a file on the host computer with the name you mention.

SFTP is first mentioned in this topic.
It might be worth reading this part of the documentation.

1 Like

You would see it while editing a local office document.

Opening /tmp/test/time_chart for editing with hidden files being unhidden in the file manager:

P.S. I have never used an ftp folder as working directory. I wonder if this is possible. I consider ftp as a repository where you upload and download files.

1 Like

sokol92: " It might be worth reading this part of the documentation."

Thanks for the reference. This method works, in fact, for me with FTP. With SFTP = SSH, I get the somewhat strange message “Non-existent file” when I attempt to set up the connection, but that is probably because on that server, I authenticate with an RSA key, while the interface asks for a password. The AFP protocol does not seem to be implemented. After all, the method is quite complicated. On my system, download-edit-upload by means of the Gnome interface seems easier.

“You would see (a certain file) while editing a local office document.”

Yes, I see it in that case. As mentioned, I attempt to edit a remote file. As to FTP, see above.