GNOME Bugzilla – Bug 133696
Nautilus opens folder even if there's no permission to
Last modified: 2021-06-18 15:16:15 UTC
When opening a folder that you have no read/execute access to (e.g. /root) in Nautilus-2.5.6, the program displays error message ("You do not have the permissions necessary...") and spawns an empty window (that would display that folder). If I were Nautilus, I would just display "Access Denied" error message without opening any new windows.
*** Bug 144895 has been marked as a duplicate of this bug. ***
Created attachment 28991 [details] [review] Destroy parent window if error is GNOME_VFS_ERROR_ACCESS_DENIED
Random thought: If middle click is used to close the current window and open a new folder, but the new folder gives permission denied, should the view go back to the previous folder?
Yes, I think it's the behaviour that the user may expect. I'm very new to nautilus hacking, so I don't found a easy way to do that since from the error call in fm-directory-view I don't known how access to the "calling" window to show it again.
Thanks for your bug report and your efforts! Sorry that we didn't have to take a look at it more early. It still applies cleanly to recent Nautilus versions. Maybe you could subscribe to the Nautilus mailing list [1] and this patch to this list afterwards? [1] http://mail.gnome.org/mailman/listinfo/nautilus-list
a short comment on the patch: You should check whether the toplevel window is a spatial one before destroying it, since destroying browser windows isn't very friendly in this context.
David?
Mmm, taken a look to the behaviour again, I think nautilus have changed. If I have not read/execute permission, I don't see that folder in parent window. And if I see it and click on it, nautilus informs about the permission problem, doesn't close the parent window and the folder with permission problem it's removed from the view. I use ubuntu nautilus 2.10.0. Do you see this behaviour too or maybe a patched debian nautilus ?
Seems like the issue is still there (2.11.3). Here's the sequence to reproduce it: Create folder 'foo'. Open it. Create folder 'bar' there. Change permissions of 'bar' to 000. Now double-click the 'bar' icon. What I get is a window for 'bar' poening that is empty and then a messagebox saying that I don't have permission to read the folder. The empty folder contents window stas there after I dismiss the messagebox. What I expect to see instead is just a messagebox that tells me there's no permission and no folder window - I don't have rights to open it after all.
Does this bug cover creation of icons on the desktop too? As discussed on Ubuntu (http://launchpad.net/bugs/12154), if a computer has a partition which cannot be accessible from a user, nautilus should not show its icon on desktop (and all other places). What do you think? That's related to this bug or is it a new one?
My bad on previous comment. The right Ubuntu bug report is http://launchpad.net/bugs/41204 Sorry.
Still in 2.32.
Mockup from dup bug 164850: https://bugzilla.gnome.org/attachment.cgi?id=165471 and http://www.gnome.org/projects/evince/images/screenshot-secret_document.pdf-full.png
*** Bug 164850 has been marked as a duplicate of this bug. ***
GNOME is going to shut down bugzilla.gnome.org in favor of gitlab.gnome.org. As part of that, we are mass-closing older open tickets in bugzilla.gnome.org which have not seen updates for a longer time (resources are unfortunately quite limited so not every ticket can get handled). If you can still reproduce the situation described in this ticket in a recent and supported software version of Files (nautilus), then please follow https://wiki.gnome.org/GettingInTouch/BugReportingGuidelines and create a new ticket at https://gitlab.gnome.org/GNOME/nautilus/-/issues/ Thank you for your understanding and your help.