Gedit unable to save to network share
When i open files with Gedit from a network location, SMB in my case, i am unable to save them. When i save i get and error
"Could not save the file "/home/user/SMB-mounted-network-location/test/file.txt
Unexpected error: Error renaming temporary file: Resource temporarily unavailable"
and in the same folder from where i opened "file.txt" a temporary file is created ".goutputstream-EG2451". I have checked the permissions on the SMB server for the ".goutputstream-AO9U51" temporary file and it is exactly the same permissions as that of "file.txt".
file.txt permissions
----------+ 1 user other 13 May 28 21:37 file.txt
0:group:testg:read_data/write_data/append_data/read_xattr/write_xattr
/execute/delete_child/read_attributes/write_attributes/delete
/read_acl/write_acl/write_owner/synchronize:inherited:allow
.goutputstream-EG2451 permissions
----------+ 1 user other 13 May 30 03:02 .goutputstream-EG2451
0:group:testg:read_data/write_data/append_data/read_xattr/write_xattr
/execute/delete_child/read_attributes/write_attributes/delete
/read_acl/write_acl/write_owner/synchronize:inherited:allow
The "user" is in the group "testg". I can open the same file with vi edit and save. I can also open LibreOffice documents from the same network location edit and save. The user can create directories on the network share, copy files/directories to, delete files/directories, etc. So no question that permissions are set correct. The group that the "user" is in has full permissions.
If i launch Gedit from cli i see a message on cli when saving the file "Hit unhandled case 27 (Error renaming temporary file: Resource temporarily unavailable) in parse_error."
I have read reports 1 2 3 4 dating as far back as 12 years all with the same problem.
On issue 438 it is reported that "As far as I can tell, the problem is in the way glib saves a file by writing to a temporary file and renaming to the final name." and "I'll take a more serious look later but I'd start with gio/glocalfileoutputstream.c and particularly the function _g_local_file_output_stream_really_close which contains the error string "Error renaming temporary file".".
A duplicate issue 565 to issue 438 was opened and there a patch is provided that is said to fix this issue.
All that said, i am still unsure if this is in fact an issue with Glib or if the issue is with Gedit. But i can say that i don't experience this issue with any other software that i use and i keep all of my data on network shares. If another application did the same i would pick it up.
I have tested this on Fedora 37 and Debian 11.