Bug 668057
Summary: | [fix available] file locks are not created with gvfs-sftp volumes with OpenOffice.org/LibreOffice | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Matthew Mosesohn <mmosesoh> | ||||||||||
Component: | libreoffice | Assignee: | Caolan McNamara <caolanm> | ||||||||||
Status: | CLOSED ERRATA | QA Contact: | Desktop QE <desktop-qa-list> | ||||||||||
Severity: | high | Docs Contact: | |||||||||||
Priority: | low | ||||||||||||
Version: | 6.1 | CC: | caolanm, cmeadors, dtardon, msanders, ofourdan, syeghiay, tpelka, vsharapo | ||||||||||
Target Milestone: | rc | Keywords: | ZStream | ||||||||||
Target Release: | --- | ||||||||||||
Hardware: | Unspecified | ||||||||||||
OS: | Unspecified | ||||||||||||
Whiteboard: | |||||||||||||
Fixed In Version: | libreoffice-3.4.5.2-8.el6 | Doc Type: | Bug Fix | ||||||||||
Doc Text: |
Cause: Unable to create lock files on sftp file shares
Consequence: Multiple users editing the same document shared out on certain network schemes are unaware that the document is being edited by someone else
Fix: Extend the list of known protocols which can support file locking to include sftp
Result: Multiple users editing a document shared over sftp will be warned if someone else is also editing that document
|
Story Points: | --- | ||||||||||
Clone Of: | Environment: | ||||||||||||
Last Closed: | 2012-06-20 12:52:51 UTC | Type: | --- | ||||||||||
Regression: | --- | Mount Type: | --- | ||||||||||
Documentation: | --- | CRM: | |||||||||||
Verified Versions: | Category: | --- | |||||||||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||||||
Cloudforms Team: | --- | Target Upstream Version: | |||||||||||
Embargoed: | |||||||||||||
Bug Depends On: | |||||||||||||
Bug Blocks: | 637248, 671087 | ||||||||||||
Attachments: |
|
Description
Matthew Mosesohn
2011-01-07 19:17:42 UTC
Additionally, if there is a lock file present, OpenOffice.org appears to ignore it when mounting over gvfs-sftp, and opens the file for editing (possible data loss) This request was evaluated by Red Hat Product Management for inclusion in the current release of Red Hat Enterprise Linux. Because the affected component is not scheduled to be updated in the current release, Red Hat is unfortunately unable to address this request at this time. Red Hat invites you to ask your support representative to propose this request, if appropriate and relevant, in the next release of Red Hat Enterprise Linux. If you would like it considered as an exception in the current release, please ask your support representative. Locks are only created for file:/// urls not sftp:// ones. I suppose we can extend this for other protocols, sftp anyway. Created attachment 472644 [details]
proto-patch, might work
Caolan, Against what version of OpenOffice.org is this? I tried to patch the latest RHEL6 SRPM openoffice.org-core-3.2.1-19.6.el6.x86_64.rpm, and many of these patches fail. Is against head of course. I'll fiddle with a backport tomorrow and stick it here then. Created attachment 472995 [details]
backport this
Created attachment 473500 [details]
better patch
Confirmed. This creates the lock files properly for gvfs-sftp volumes. As a bonus, an unpatched OpenOffice 3.2.1 will identify locked files. I commend your efforts! This patch contains a regression that makes this problem worse. If you write a new file to a gvfs-sftp volume, it writes with mask 0600 and ignores setgid permission bit on a folder. Steps to reproduce: Create a folder on a server with permissions 2770 Connect via SFTP to this server Write a new file inside of this folder The resulting file has permissions 0600, but should have 0660 Please don't go forward with pushing this fix until this regression can be fixed. Hmm, that's definitely odd. The new file has perms 0600 because we just copy a file that has been created locally in /tmp with perms 0600 using gio_file_copy. (And the unpatched version behaves in the same way, so it is not a regression .-) David, I hate to disagree with you, but I have a freshly installed RHEL 6 system that has openoffice version 3.2.1-19.6.el6.x86_64 (not patched), and I did the following steps: 1) Connect to the same server that I can reproduce this bug on 2) Create a new spreadsheet with OpenOffice Calc 3) type the word test in 20 random cells 4) File -> Save 5) browse to the mounted sftp volume 6) save with a new filename 7) SSH in and look at file permissions. The file obtains the proper permissions I repeated this process 3 times with both patched and unpatched systems and the unpatched system never wrote a file with permissions 0600. I did notice that if you have this scenario, the file written is fine with proper permissions: 1) Create a new file 2) Save it locally 3) Save it to the SFTP volume Would debugging output help you with this effort? Created attachment 474500 [details]
use server-side permissions when copying local tmp file to server
fair enough, this does the trick
Confirmed. This patch works. I have verified that this patch does not have the file permission issues that the previous one did. Technical note added. If any revisions are required, please edit the "Technical Notes" field accordingly. All revisions will be proofread by the Engineering Content Services team. New Contents: Cause: Unable to create lock files on sftp file shares Consequence: Multiple users editing the same document shared out on certain network schemes are unaware that the document is being edited by someone else Fix: Extend the list of known protocols which can support file locking to include sftp Result: Multiple users editing a document shared over sftp will be warned if someone else is also editing that document Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. http://rhn.redhat.com/errata/RHEA-2012-0798.html |