Nautilus does not warn when deleting read-only files

Bug #152879 reported by Mathias Menzer
22
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Nautilus
Fix Released
Low
One Hundred Papercuts
Fix Released
Undecided
Unassigned
nautilus (Ubuntu)
Fix Released
Low
Ubuntu Desktop Bugs

Bug Description

Binary package hint: nautilus

Nautilus deletes files without warning even when they have been marked read-only (444) or don't read (000). You have to be the owner of the file to do this. The behavior when using 'rm' on the console is a warning that the file is write protected. This should be implemented in Nautilus since at the moment no effective protection against accidental removal of files is possible.

Tags: nautilus-gio
Revision history for this message
Roel Huybrechts (rulus) wrote :

I can reproduce this on Feisty: Nautilus trashes and deletes a read-only file without any warning.

Revision history for this message
Mathias Menzer (mfm) wrote :

I also reproduced this on Gutsy.

Roel Huybrechts (rulus)
Changed in nautilus:
assignee: nobody → rulus
status: New → Confirmed
assignee: rulus → nobody
Changed in nautilus:
assignee: nobody → desktop-bugs
importance: Undecided → Low
status: Confirmed → Triaged
Changed in nautilus:
status: Unknown → New
Revision history for this message
Iulian Udrea (iulian) wrote :

I can reproduce this on Hardy, nautilus version 2.21.6. I don't get any message when deleting a write protected file in nautilus, although when I use rm in a terminal I get rm: remove write-protected regular file `test'?

Revision history for this message
Fred (eldmannen+launchpad) wrote :

I think this is rather important, and should be fixed.

Revision history for this message
Mathias Menzer (mfm) wrote :

I reproduced this on Hardy-Alpha4, too. Nautilus 2.22.0

Changed in nautilus:
status: New → Confirmed
Revision history for this message
Mathias Menzer (mfm) wrote :

Reproduced this on Hardy-Final too, Nautilus 1:2.22.2-0ubuntu5

Revision history for this message
Mathias Menzer (mfm) wrote :

Issue still seen in Intrepid-Alpha6, nautilus 1:2.24.0-0ubuntu1

Revision history for this message
Mathias Menzer (mfm) wrote :

Issue still in Jaunty-Alpha5, nautilus 1:2.25.91-0ubuntu1

Changed in nautilus:
status: Confirmed → Invalid
Revision history for this message
Mathias Menzer (mfm) wrote :

This is not a duplicate of #42761! Please remove duplicate status.

This issue was also seen in Ubuntu 9.04, nautilus 2.26.2

Revision history for this message
Alexander Fieroch (fieroch) wrote :

Nautilus generally should warn before deleting files, not only for read-only files. Some notebook keyboard layouts are bad designed to press 'del' by accident. Sometimes you don't recognize that you have moved some files to the trash by accidentally pressing 'del'.

Revision history for this message
Lorenzo (lorenzo-delledonne) wrote :

Assuming that you mean "Delete" and not "Move to Trash", I cannot reproduce this bug on Jaunty.

Revision history for this message
Lightbreeze (nedhoy-gmail) wrote :

This is not a 'paper cut' as it is unlikely to be encountered during the first day using Ubuntu.

Changed in hundredpapercuts:
status: New → Invalid
Changed in nautilus:
status: Invalid → Unknown
Changed in nautilus:
status: Unknown → Confirmed
Revision history for this message
Holger Berndt (berndth) wrote :

The bug description reveals a misunderstanding of the permissions system. File creation and deletion are operations on the _containing directory_ and are affected by the permissions set on that directory. You can create and delete files if you have +w on the parent directory. File permissions, on the other hand, don't have any influence on that.

As a consequence the statement
> You have to be the owner of the file to do this.
is wrong, too. Try it: Create a file with permissions 400 and owner "root" in your home directory. You will be able to delete it even as a normal user. I repeat: This is not a bug, but the way unixoid permissions work.

In addition, this behavior is completely consistent with the permission display in Nautilus when the "show_advanced_permissions" switch is off.

Now, since that seems to be a common misunderstanding, the GNU project decided to add a warning for that special case to 'rm'. However, that is clearly an enhancement request, and not a bug.

Revision history for this message
Lorenzo (lorenzo-delledonne) wrote :

@ Lightbreeze: are you sure? I mean, I don't really know whether this bug can be considered as a paper-cut or even as a bug itself, but I don't think it should be marked as 'invalid' by the reasons you proposed. If it's a confirmed bug in nautilus, it will affect a large number of people. Please expose further reasons for marking this as invalid.

Changed in hundredpapercuts:
status: Invalid → Incomplete
Revision history for this message
Lightbreeze (nedhoy-gmail) wrote :

A warning is shown when removing _any_ file from the hard drive, including read-only files. "Move to Trash" does not warn for any file.

a) this bug means any dialog removing files should warn that some of those files are read-only, rather than showing a generic "Are you sure you want to permanently delete[...]".

b) this bug means the dialog for emptying items from the Trash should warn that some files are read-only.

c) this bug means warning before moving read-only files to Trash.

I'm not sure which of these best describes the problem, could I get feedback to help make this clear, thanks!

@ Lorenzo: Thanks for picking me up on this, I may have been hasty, let's just leave this as Incomplete for now.

Revision history for this message
Mathias Menzer (mfm) wrote :

I think a warning when moving files to the trash would be appropriate. When the Trash is cleared, Nautilus does not warn anymore, when read-only files are removed from there and since using the Trash is default in Ubuntu/GNOME, there should at least be a notification when you move a read-only file to it.

Changed in nautilus:
importance: Unknown → Low
Changed in nautilus:
status: Confirmed → Fix Released
Revision history for this message
Chris Wilson (notgary-deactivatedaccount) wrote :

Marking as fixed to reflect the upstream status.

Changed in hundredpapercuts:
status: Incomplete → Invalid
status: Invalid → Fix Released
Changed in nautilus (Ubuntu):
status: Triaged → Invalid
status: Invalid → Fix Released
Revision history for this message
Aldrin (aldrin-baroi) wrote :

I am using Ubuntu 13.10 x86_64 and
looks like not fixed in Ubuntu 13.10 x86_64.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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