LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Can't edit OO docs over nfs (https://www.linuxquestions.org/questions/linux-general-1/cant-edit-oo-docs-over-nfs-566436/)

dickgregory 07-03-2007 07:35 PM

Can't edit OO docs over nfs
 
For some reason when I open an odt or ods file in OpenOffice it opens it as read-only when the file is on an nfs server. I have read/write permissions on both the file and the directory. If I copy the file to a local directory it works ok.

I have understood that file access over nfs was transparent as long as the export was (rw) and the user has appropriate permissions.

Server: Debian 4
Client: Sabayon 3.3

I'd appreciate any insight on what I need to do to get this to work.

Thanks

jschiwal 07-03-2007 10:15 PM

I wonder if it has to do with the fact that an ODF document is a collection of zipped documents? Does this happen with all Open Office documents or just these two formats?

Can you open a zip collection in ark and then add a file?

My guess is that byte-range-locking is normally performed but this is impossible because the file can't be locked this way because it is a zip file, and needs to be saved over in the end.
This is just a wild guess on my part.

Another possibility is that because it is a zip file, and byte-range locking won't work, to save your changes, a deletion of the original file would need to be performed. If you aren't the owner of the document, and the sticky bit is set on the directory being shared, that is prohibited. A way to test if this is the problem would be to save an original OO document on this share and then try to edit it. Look at the ownership of the document. If the suid or guid on the directory isn't set, changing the ownership or group ownership, can you edit and save the document?

dickgregory 07-04-2007 09:14 AM

Thanks jschiwal for your reply.

I tried it with the wordprocessor, spreadsheet, and impress formats. They all fail when I open them over nfs.

I can zip them and copy the zip to /home and everything opens fine as (rw). Or I can copy an individual file to /home and it works. It's just when I try to open it from the nfs share.

I tried creating a new document and saving it, but got a write error and it created a zero byte file.

When I open the ods file in gnumeric it opens it as read/write and saves it ok in the gnumeric format. That is not an option for other OO formats though. Apparently gnumeric can import but not export opendocument formats. Other applications, such as text editors can also open stuff and save correctly.

I've tried to find OO options that control this sort of thing, but the only thing I found was in the security setting where there is a checkbox saying "open file as read-only" and it is not checked.

I'm stumped.

jschiwal 07-04-2007 07:55 PM

Quote:

I can zip them and copy the zip to /home and everything opens fine
I think that you misunderstood me. An open office document is already a zip file to begin with.

Code:

unzip dummycalc.ods
Archive:  dummycalc.ods
 extracting: mimetype
  creating: Configurations2/statusbar/
  inflating: Configurations2/accelerator/current.xml
  creating: Configurations2/floater/
  creating: Configurations2/popupmenu/
  creating: Configurations2/progressbar/
  creating: Configurations2/menubar/
  creating: Configurations2/toolbar/
  creating: Configurations2/images/Bitmaps/
  inflating: content.xml
  inflating: styles.xml
 extracting: meta.xml
  inflating: Thumbnails/thumbnail.png
  inflating: settings.xml
  inflating: META-INF/manifest.xml

I just found this webpage. The author commented out two lines dealing with filelocking.
http://theopenstandard.com/blogs/ada...-over-NFS.html

dickgregory 07-05-2007 08:06 AM

Thanks again jschiwal. According to the link you gave me, the discussion there was specific to some versions of SUSE. However the problem appears to exactly what I am experiencing, so when I get home tonight I will try that solution.

dickgregory 07-05-2007 05:15 PM

jschiwal, that was exactly the solution I needed. After making the changes as described in the link you provided, my problem has been solved.

Thank you.

jlliagre 07-05-2007 06:06 PM

This fix actually introduces a new issue: file locking is disabled so there is a risk of data loss if the document is open more than once at the same time.

A better but less simple to implement solution would be to upgrade to NFSv4.

http://www.vanemery.com/Linux/NFSv4/...no-rpcsec.html

dickgregory 07-06-2007 07:48 AM

Thanks jlliagre for the heads up. I am aware of this and I have already considered the risks. I only have two local users, including myself. The other users will be managing files via scp until I get a versioning system implemented. Each remote user will be responsible for a distinct set of files, so we won't have many concurrency issues.


All times are GMT -5. The time now is 07:07 AM.