Feature request: save files read-only when invoking external viewers

Bug #175286 reported by Pär Lidén
4
Affects Status Importance Assigned to Milestone
firefox (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Binary package hint: mozilla-firefox

I think that Firefox should save files readonly to /tmp when a user click on files that require apps external to Firefox.

The reason is this: if a user opens a file from within Firefox, and then does some editing and tries to save the file, he will get an error message if the file is saved readonly. And I think that would be helpful.

Here is my story behind this problem (much abbreviated version):

I was sitting at gmail, and reading a mail with an attachment. I clicked that attachment, to open it in openoffice. I made a lot of changes, and after that I saved. Then I rebooted my computer, started openoffice and tried to open the file (from the file->recently documents menu). And BANG, error message "file does not exist".

So, the problem was that I forgot that I had opened it from Firefox. I should have taken Save as instead. And Firefox first saves the file to /tmp, and then invokes Openoffice (or whatever program it is) to open the file. And as I use shmfs for /tmp, everything of course got erased from there.

My fix for this problem is that Firefox should save these files in read-only mode to /tmp. Then when stupid users (like me) tries to save them, they will get an error message.

To get a really helpful message, we would have to modify openoffice (and every other application), and make the browser open them with some special flag (telling the apps that it is a temporary file). Then the apps could display some error message like "Warning: you are saving this file to temporary space. Probably you will not be able to open this file in the future, and then all your changes will be lost. Save the file in a different location instead, using File -> Save as." But modifying all other programs is certainly not feasible IMO.

So the user still has to do Save as in order to store the file safely. My important point is that the user should in some way get a note that he is doing something stupid when he tries to save that file.

Use cases:
Per is a knowledgeable computer user, but with a bad a memory. He would benefit from getting an error message when trying to save a file which he forgot where he opened it from.
Ralf is a computer newbie who sometimes edits and saves files he has opened from Firefox, and never understand why they disappear. He would probably benefit from getting an error message when trying do to so, as he then might ask someone more skilled who can help him.

This fix would probably be quite easy to implement, I think. And I suppose that I'm not the only one which has done this kind of mistake, it would probably be of benefit to a lot of people, especially newbies. And I can't really see any big downsides with this behavior.

Please tell me if I should clarify something. You might also want to look at this forum thread: http://ubuntuforums.org/showthread.php?t=630532. This is where the idea about this started.

Revision history for this message
Rolf Leggewie (r0lf) wrote :

What happens when you move the file? I guess it would still be read-only in most cases. That of course does not help either. So, while I understand your motivation and generally think this might be worth implementing, some more thought has to go into this.

Revision history for this message
Pär Lidén (par-liden) wrote :

Well, changing this behavior won't prevent totally stupid users (like me) from doing stupid things. But in the current form as the idea is, it will definitely help to a certain degree. It is more like a quick hack to provide some kind of hint to the user to not do a stupid thing in some situations.

Can you see any drawbacks with the idea in it's current form? If there are no significant drawbacks, I can't see any reason to not implement it (except the time involved, and maybe compatibility problems with existing applications relying on the old behavior).

Revision history for this message
jsandeo (jsandeo) wrote :

Drawbacks:
Use-case 1 : I want to open a text document, change a few things and print it.
Use-case 2 : I want to open a spreadsheet and mess with the formulas and numbers just to compare a few numbers.

In both cases, even if I don't want to keep the document, I am forced to:
1) Press "Save as..."
2) Choose and type a name for a document I don't even want to keep
3) Press "Save"

Revision history for this message
Pär Lidén (par-liden) wrote : Re: [Bug 175286] Re: Feature request: save files read-only when invoking external viewers
  • unnamed Edit (564 bytes, text/html; charset=ISO-8859-1)

Hmm, it seems that you are right, at least with openoffice 2.4 when I just
tried.
Thanks for your thoughts about this.
Well, maybe these are heavy enough arguments to not implement this change in
behavior.

I still ponder over if there could be some other way to get some kind of
protection when a user saves changes to such a temporary file? This would
need to be a quite different way of doing it though, and I can't come up
with any good ideas for it myself (except for some very complicated
solutions). Do you have any ideas for this?

Revision history for this message
Adrian Bridgett (adrian-bridgett) wrote :

found this request finding out how to turn this _off_ (on Debian sid). I can certainly see _why_ you want this, but I would ask that it be made optional. You could even make it dependent on location - i.e. /tmp (read only), /home (read-write). But then it also depends what you are doing - a PDF would normally be a read-only operation (and you'd want the file removed automatically). An openoffice doc, well, that's harder to say. Personally, saving to /tmp and leaving it there is fine (if I want to keep it I'll move it myself to /home).

Just another PoV :-)

Revision history for this message
PluckDuck (daniel-fassa) wrote :

As, jsandeo mentioned. It's a HUGE drawback.

To me is a huge problem. I work with a lot of spreadsheets every day (more that 50 a day), most of them i have to perform minor changes e execute macros. And with this for a lack of better words, it's a pain in the ass having to save every and witch file that i have to work just to perform this minor changes.
And besides, what is the real big problem leaving the file as it is? For real guys? That's the kind of thing u should expect prom MSIE, not mozilla pleeease.

:D

DF

Revision history for this message
Pär Lidén (par-liden) wrote :

Yes, everyone here has convinced me that this proposal has more drawbacks than advantages. However, Pluckduck, I'm quite convinced there is a problem for people who are sometimes stupid/sleepy (like me). So no matter how experienced you are, you are still able to make mistakes. And not to talk about newbies, which Ubuntu are supposed to target also.

But that said, I think this bug can be closed now. Thanks everyone for your thoughts about this.

Changed in mozilla-firefox:
assignee: nobody → par-liden
Revision history for this message
Pär Lidén (par-liden) wrote :

Now I changed the status to "Invalid". Is this the right thing to do, or is there something else that I'm supposed to do also?

Changed in firefox:
status: New → Invalid
assignee: par-liden → nobody
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.