Download it now!
Bug 45243 - Allow writing in a read-only file
Summary: Allow writing in a read-only file
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: UI (show other bugs)
Version:
(earliest affected)
3.4.4 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 55548 (view as bug list)
Depends on:
Blocks:
 
Reported: 2012-01-25 13:05 UTC by Ryo Furue
Modified: 2015-04-24 14:04 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ryo Furue 2012-01-25 13:05:58 UTC
Problem description: When you open a read-only file, LibreOffice disables modifying operations, such as "Edit > Changes > Accept or Reject".  That is a wrong design, I think.  For sure, you should disable any functionality to modify the original file such as "File > Save".  But, you often want to open a read-only file, modify it, and "Save As" a different file.  Sometimes, you want to open a read-only file, accept the changes your co-author made, print the result out, and quit LibreOffice without saving the accepted changes.

Steps to reproduce:
1. $ lowriter a-read-only-file.doc
2. Edit > Chages > Accept or Rject
3. You find it's disabled.

Platform (if different from the browser): Debian GNU/Linux (testing). i686.
              
Browser: Opera/9.80 (X11; Linux i686; U; en) Presto/2.10.229 Version/11.61
Comment 1 tester8 2012-01-28 10:24:43 UTC
Reproduced with

LOdev 3.5.0rc2
Ubuntu 10.04.3 x86
Linux 2.6.32-37-generic Russian UI
Comment 2 Joel Madero 2013-05-29 21:24:35 UTC
*** Bug 55548 has been marked as a duplicate of this bug. ***
Comment 3 Samuel Mehrbrodt (CIB) 2014-09-22 22:08:23 UTC
We now have an infobar appearing when the document is opened read-only. That lets you quickly go to edit mode.

Is that enough?
Comment 4 ign_christian 2014-09-23 03:43:46 UTC
Seems to be a misperception here. Based on my interpretation, "Accept or Reject" changes only available if "Record" changes activated: https://help.libreoffice.org/Common/Recording_Changes

So if I interpret correctly, this report is invalid.
Comment 5 Ryo Furue 2014-09-23 14:38:42 UTC
(In reply to comment #4)
> Seems to be a misperception here. Based on my interpretation, "Accept or
> Reject" changes only available if "Record" changes activated:
> https://help.libreoffice.org/Common/Recording_Changes
> 
> So if I interpret correctly, this report is invalid.

No.  Sorry if ONE of my examples was invalid.  But, my original request still stands, I think. LibreOffice (at least before the fix) didn't allow many (if not all) modifying operations if the opened file is read-only.  That is inconvenient.

I just listed two example where modifying the contents of a read-only file is useful.  (Apparently one of the two examples was invalid.)

Regards,

Ryo
Comment 6 ign_christian 2014-09-23 15:22:38 UTC
I just realize you was reported many issues here. Should be 1 issue / report.

There are some similar bugs regarding what you mentioned. Perhaps what you meant with your 2nd case is Bug 65498 or Bug 61356 ?
Comment 7 Ryo Furue 2014-09-24 02:53:54 UTC
Thank you for your responses.

(In reply to comment #6)
> I just realize you was reported many issues here. Should be 1 issue / report.
> 
> There are some similar bugs regarding what you mentioned. Perhaps what you
> meant with your 2nd case is Bug 65498 or Bug 61356 ?

Those seem to be similar to, or the same as, mine.  The thing is, though, I don't know what issues are (internally) the same and what are separate.

So, let me rephrase what I (or we, who have submitted similar requests) wish, in terms of the "behavior" of LibreOffice.

In my opinion, opening a read-write file and opening a read-only file should result in only one or two differences.

1) When you start to "edit" (modify the contents of) a read-only file, a pop-up would open, saying "Are you sure you want to edit this read-only file? [y/n]:"

2) When you try to wave into a read-only file, a dialogue would open, saying "Do you really overwrite this read-only file? [y/n]:"

Otherwise, opening a read-only and opening a read-write file should be indistinguishable (apart from the window title indicating "read-only").  I don't think (1) is essential.

Regards,

Ryo
Comment 8 QA Administrators 2015-04-01 14:47:17 UTC
Dear Bug Submitter,

This bug has been in NEEDINFO status with no change for at least
6 months. Please provide the requested information as soon as
possible and mark the bug as UNCONFIRMED. Due to regular bug
tracker maintenance, if the bug is still in NEEDINFO status with
no change in 30 days the QA team will close the bug as INVALID
due to lack of needed information.

For more information about our NEEDINFO policy please read the
wiki located here:
https://wiki.documentfoundation.org/QA/Bugzilla/Fields/Status/NEEDINFO

If you have already provided the requested information, please
mark the bug as UNCONFIRMED so that the QA team knows that the
bug is ready to be confirmed.
 
Thank you for helping us make LibreOffice even better for everyone!


Warm Regards,
QA Team
Comment 9 Ryo Furue 2015-04-01 15:55:35 UTC
> Dear Bug Submitter,
>
> This bug has been in NEEDINFO status with no change for at least
> 6 months. Please provide the requested information as soon as
> possible

Sorry I don't understand this.  I responded.  See the message "Ryo Furue 2014-09-24 02:53:54 UTC".  Do you need more information?  Please ask me specific questions.

What should I do now?

Ryo
Comment 10 Ryo Furue 2015-04-02 04:22:44 UTC
It seems that what is requested is not clear from this thread. Let me rephrase what change I'd like to see.

I think it's best to treat a read-only file in the same way as a read-write file, except when saving.

Currently, you have to "unlock" it before editing a read-only file.  I my opinion, this is a misfeature.

I guess the idea of unlocking a read-only file comes from a confusion between the read-only-ness of the filesystem and the editability within LibreOffice.

In other words, what I'm requesting is: all files should be "editable"; the read-only-ness of the filesystem should matter only when you try to overwrite an existing file.  It would be nice if LibreOffice has two modes: the editing mode and a "view mode" where all editing operations are forbidden, but the default mode should be "editing" for all files.

Why?  There are two reasons:

1) It's quite common to open a document and edit it WITHOUT intending to overwrite the original.  If the original is important enough, you set it read-only on the filesystem.  You still open and edit it to SAVE AS a new file or to print it out, without saving the change.

2) Most editing applications behave as I describe.  Actually, I don't know any that behaves like LibreOffice.  For example, open a read-only PDF file with Adobe Reader and add comments.  No problem.  It's just that you can't overwrite the original.  The question then is whether the behavior of LibreOffice brings about significant benefits over the other behavior.  I'm afraid I don't think so.

Regards,

Ryo
Comment 11 steve -_- 2015-04-06 10:54:05 UTC
Ryo, this is working as currently designed. If you open a read-only file it will ask, if you want to open it "read-only" or "open" in which case you will be able to edit the file.

In QA IRC we (beluga, mjayfrancis and myself) agreed that the current LO workflow is sufficient and that since current workflows should not be broken, it's best to leave this untouched.

Closing as worksforme.
Comment 12 Ryo Furue 2015-04-06 12:20:13 UTC
Thank you, Steve, for your response.

> this is working as currently designed.
> If you open a read-only file it will ask,
> if you want to open it "read-only" or "open"
> in which case you will be able to edit the file.
>
> In QA IRC we (beluga, mjayfrancis and myself) agreed
> that the current LO workflow is sufficient

I agree that it's sufficient.  But, I see two remaining inconsistencies:

1) Open a read-only file, hit the "Edit Document" button
   above the document pane, add some text, and look at the "File" menu.
   The "Save" item is still disabled.

2) Then, change the permission of the original file on the disk,
   go to the "Save As" menu, and try to overwrite the original.
   LibreOffice gives you an error

      Error saving the document tmp:
      Object not accessible.
      The object cannot be accessed
      due to insufficient user rights.

Again, this is not a contrived workflow.  I sometimes
do open a read-only file with the intention of overwriting it
and without realizing that it's read-only.  In that case,
I change the permission of the original file to read-write
on the disk.  A normal editing application allows overwriting
the original.  It's only LibreOffice which doesn't allow it,
as far as I know.

So, it may be a good idea to warn the user that the file
is read-only when opening it.  But, that should be the ONLY
difference visible to the user (except when trying to overwrite
it), in my opinion.

Should I submit this request separately?

Regards,

Ryo

P.S. I'm using LibreOffice 4.4.2002 on Mac OS X 10.10.2 .
Comment 13 Matthew Francis 2015-04-24 14:04:52 UTC
The originally reported issue has been resolved by the addition of the infobar prompt which allows an easy change to read-write mode

The remaining issues mentioned later should be covered by bug 65498 and the other bugs linked from there