Bug 40244 - FILESAVE to read-only location gives wrong error message
Summary: FILESAVE to read-only location gives wrong error message
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.1 release
Hardware: All Linux (All)
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 115796 (view as bug list)
Depends on:
Blocks: Error-Messages
  Show dependency treegraph
 
Reported: 2011-08-19 13:30 UTC by brookembecker
Modified: 2018-10-07 07:00 UTC (History)
6 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 brookembecker 2011-08-19 13:30:55 UTC
Trying to save a file to a write-only folder on an ext3 disk mounted on /media/<volume name>/ gives error message "Error saving the document <document name>: <path>/<document name> does not exist". After changing folder permissions to read+write file saves ok without any errors. The error message could be more useful.

This is LibreOffice as packaged with Ubuntu 11.04. It reports itself as:
LibreOffice 3.3.3 
OOO330m19 (Build:301)
tag libreoffice-3.3.3.1, Ubuntu package 1:3.3.3-1ubuntu2
Comment 1 Jeffrey 2011-08-20 06:08:09 UTC
At first I thought that you meant the problem was that you could not save the file properly, which did not make sense because an unwritable file cannot be written to, but now I understand that you mean that instead of saying "Error saving... .odt does not exist", it should say "writing to a protected file" or something along that line, right?

I think this could possibly be an EasyHack.
Comment 2 brookembecker 2011-08-21 07:04:32 UTC
(In reply to comment #1)

Exactly - "Cannot write to read-only location" makes more sense than "Cannot write because file does not exist". To be clear, it was the whole directory that was read-only; there was not already an existing file of the same name.
Comment 3 noname 2011-08-21 07:58:33 UTC
Hmmmm. Difficult one. Might be that fopen() uses the mode WB+ (or RB+) instead of WB ?!
Comment 4 Björn Michaelsen 2011-12-23 12:38:30 UTC Comment hidden (obsolete)
Comment 5 Florian Reisinger 2012-08-14 13:59:40 UTC Comment hidden (obsolete)
Comment 6 Florian Reisinger 2012-08-14 14:00:50 UTC Comment hidden (obsolete)
Comment 7 Florian Reisinger 2012-08-14 14:05:34 UTC Comment hidden (obsolete)
Comment 8 Florian Reisinger 2012-08-14 14:07:35 UTC Comment hidden (obsolete)
Comment 9 sasha.libreoffice 2012-10-08 12:31:20 UTC
reproduced in 3.6.2 on Fedora 64 bit
tried to save to /opt
Comment 10 leighman 2012-10-08 17:07:29 UTC
Reported confirmed.
Comment 11 Alexandr 2014-12-31 10:52:51 UTC
Reproducible with LibreOffice 4.3.3 and 4.4.0 beta2 on Debian. I tried to save a file to a read only folder in ext4 filesystem and to a NTFS filesystem mounted read only.
Comment 12 QA Administrators 2016-01-17 20:04:26 UTC Comment hidden (obsolete)
Comment 13 Buovjaga 2018-03-07 12:10:28 UTC
*** Bug 115796 has been marked as a duplicate of this bug. ***
Comment 14 Buovjaga 2018-03-07 12:11:06 UTC
I noticed that on Windows we get a system message that is not the same as on Linux.
Windows: "You don't have permission to save in this location" etc.
Linux: "Error saving the document Untitled 1: /path/to/Untitled 1.odt does not exist."

The weird thing is, according to these the message should be different: https://bugs.launchpad.net/ubuntu/+source/openoffice.org/+bug/257421
https://bbs.archlinux.org/viewtopic.php?id=197928

The error text seems to be here: https://opengrok.libreoffice.org/xref/core/svtools/inc/errtxt.hrc#33

Arch Linux 64-bit
Version: 6.1.0.0.alpha0+
Build ID: 856c57f20f9b07c686a854e0ccbb6ee3b0ee4791
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Built on March 7th 2018