Nautilus cannot delete directories when it has no read permissions
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
nautilus (Ubuntu) |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
Binary package hint: nautilus
I tested it in Ubuntu 10.10 and Natty.
Correct behaviour in the shell:
~ % mkdir some_folder
~ % chmod a-rwx some_folder
~ % rm -r some_folder
rm: descend into write-protected directory `some_folder'? y
rm: remove write-protected directory `some_folder'? y
~ %
Similar with empty directories owned by root:
~ % sudo mkdir some_folder
~ % sudo chmod go-rwx some_folder
~ % rm -r some_folder
rm: descend into write-protected directory `some_folder'? y
rm: remove write-protected directory `some_folder'? y
~ %
Incorrect behaviour in nautilus:
First create an empty directory the same way as above:
~ % sudo mkdir some_folder
~ % sudo chmod go-rwx some_folder
or:
~ % mkdir some_folder
~ % chmod a-rwx some_folder
Then try to delete the folder.
Nautilus states correctly that it cannot be moved to trash ("Unable to trash file: Permission denied") and provides immediate deleting.
If you choose "Delete" nautilus gives the unexpected error message
"The folder "some_folder" cannot be handled because you do not have permissions to read it."
Correct behaviour (pcmanfm, thunar and dolphin do it correctly):
Nautilus should not be required to have read access to delete the directory. It should try to delete it anyway because chances are that the directory is empty and that the deletion will success.
In the case where the directory is owned by the user permission changing is trivial, but in the case where the directory is owned by root it is not possible to delete the directory with nautilus.
I think it should be possible because in the shell (and in other filemanagers) it is possible too and nautilus should handle permissions like any other program does.
Thank you for taking the time to report this bug and helping to make Ubuntu better. This particular bug has already been reported and is a duplicate of bug 24798, so it is being marked as such. Please look at the other bug report to see if there is any missing information that you can provide, or to see if there is a workaround for the bug. Additionally, any further discussion regarding the bug should occur in the other report. Please continue to report any other bugs you may find.