Bug 491132 - 'Open as administrator' on context menu does not show for folders under user home even when user lack sufficient permissions
Summary: 'Open as administrator' on context menu does not show for folders under user ...
Status: CONFIRMED
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 24.05.2
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-08-01 16:04 UTC by Ana Clara Forcelli
Modified: 2025-01-08 15:31 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ana Clara Forcelli 2024-08-01 16:04:31 UTC
***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
The discussion about this bug can be read here: https://discuss.kde.org/t/dolphin-does-not-show-open-as-administrator-even-after-installing-kio-admin/19434

STEPS TO REPRODUCE
1. Start with a clean installation of Arch Linux
2. download kio-admin afterward
3. open any folder (including ones owned by you) and show the context menu

OBSERVED RESULT


EXPECTED RESULT


SOFTWARE/OS VERSIONS

Operating System: Arch Linux 
KDE Plasma Version: 6.1.3
KDE Frameworks Version: 6.4.0
Qt Version: 6.7.2
Kernel Version: 6.10.2-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 8 × Intel® Core™ i7-4790 CPU @ 3.60GHz
Memory: 15.6 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series

ADDITIONAL INFORMATION
Comment 1 fanzhuyifan 2024-08-01 22:09:53 UTC
Are the folders you are trying to access under your home directory? 

If so I think this is caused by https://invent.kde.org/system/kio-admin/-/commit/b880bde441605042aacf4470eae7facdfb217818.
I.e., the context menu item does not appear for any folder under the home directory, even if it is owned by someone else.

Do you also see the issue when trying to access folders not under your home directory?
Comment 2 Ana Clara Forcelli 2024-08-02 16:52:40 UTC
(In reply to fanzhuyifan from comment #1)
> Are the folders you are trying to access under your home directory? 
> 
> If so I think this is caused by
> https://invent.kde.org/system/kio-admin/-/commit/
> b880bde441605042aacf4470eae7facdfb217818.
> I.e., the context menu item does not appear for any folder under the home
> directory, even if it is owned by someone else.
> 
> Do you also see the issue when trying to access folders not under your home
> directory?

No, it works outside of the home folder
Comment 3 Bug Janitor Service 2024-08-02 18:05:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/system/kio-admin/-/merge_requests/19
Comment 4 Felix Ernst 2024-08-02 23:52:59 UTC
I have implemented changes that alleviate this bug report for the upcoming Dolphin 24.08 release already: 
1. There is an "Act as Administrator" action in Dolphin's "View" menu that can always be used. (https://invent.kde.org/system/dolphin/-/commit/6c60655ce246a91758f4b9035edf318cb1197a2c)
2. When entering a folder which the user does not have permission to view, a button is provided to authorize oneself with higher permissions.

Another change for transparency about permissions is that we show a lock symbol next to the location bar when the user does not have write permissions for the current folder. (https://invent.kde.org/system/dolphin/-/merge_requests/748)

Considering all this I picture the best way to solve this bug report as follows:
Change the lock symbol next to the location bar so that clicking it expands a panel that explains the current permissions and that provides an "Act as Administrator" action which would guide the user to get to a state in which they can edit the folder contents.

It might also make sense to hide the kio-admin context menu action by default when this is done so users can no longer be confused about this action being available sometimes and sometimes not.
Comment 5 Ana Clara Forcelli 2024-08-05 19:26:55 UTC
This may have some other ways out without adding more graphical elements by default, which might further confuse users - instead, add another checkbox on Configure Dolphin -> Interface -> Status&Location bars, so that the menu becomes as following:

----------------
Status Bar: () Show status bar 
                    () Show Zoom Slider
                    () Show space information
                    () Show permissions information

---------------
For the standard desktop user, permissions are generally not a problem;
For the slightly educated user, the icon
Comment 6 Ana Clara Forcelli 2024-08-05 19:30:01 UTC
(In reply to Ana Clara Forcelli from comment #5)
> This may have some other ways out without adding more graphical elements by
> default, which might further confuse users - instead, add another checkbox
> on Configure Dolphin -> Interface -> Status&Location bars, so that the menu
> becomes as following:
> 
> ----------------
> Status Bar: () Show status bar 
>                     () Show Zoom Slider
>                     () Show space information
>                     () Show permissions information
> 
> ---------------
> For the standard desktop user, permissions are generally not a problem;
> For the slightly educated user, the icon



oops, i hit enter accidentally 

----------------
Status Bar: () Show status bar 
                    () Show Zoom Slider
                    () Show space information
                    () Show permissions information
                                 (submenu)
                                 () Show Icon
                                 () Display symbolic (dwrxdwrxdwrx)
                                 () Display Octal (755)
---------------
For the standard desktop user, permissions are generally not a problem;
For the slightly educated user, the icon is enough info
For powerusers, symbolic  and octal
Comment 7 Felix Ernst 2024-08-06 16:41:00 UTC
(In reply to Ana Clara Forcelli from comment #5)
> This may have some other ways out without adding more graphical elements by
> default, which might further confuse users

We have already added the lock icon for read-only directories. My suggestion does not add any new elements which would be visible by default. I actually suggest to remove one item from the right-click context menu which users open quite frequently.

> - instead, add another checkbox
> on Configure Dolphin -> Interface -> Status&Location bars, so that the menu

Your suggestion also adds graphical elements, so I am not sure I understand where you are seeing an advantage.

Also be aware that we allow hiding of the status bar, so users would not know that they are in a read-only directory if they wouldn't have that information enabled.
Comment 8 David Edmundson 2024-10-25 16:11:45 UTC
Starting dolphin as root is bad practice and unsupported. 
For root operations please use kio-admin
Comment 9 fanzhuyifan 2025-01-08 15:31:41 UTC
(In reply to David Edmundson from comment #8)
> Starting dolphin as root is bad practice and unsupported. 
> For root operations please use kio-admin

This bug report is not about starting dolphin as root. This *is* about the quirks of kio-admin.