Bug 499003 - In Act as Administrator mode, Dolphin creates drag-and-drop links as .desktop files pointing to a path with admin:/ prepended, instead of as actual symlinks
Summary: In Act as Administrator mode, Dolphin creates drag-and-drop links as .desktop...
Status: CONFIRMED
Alias: None
Product: kio-admin
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 24.12.1
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Unassigned bugs mailing-list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-01-22 12:24 UTC by Damglador
Modified: 2025-01-27 07:44 UTC (History)
4 users (show)

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


Attachments
Error from drag and drop (14.47 KB, image/png)
2025-01-27 07:44 UTC, Damglador
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Damglador 2025-01-22 12:24:41 UTC
SUMMARY
I will describe here 2 issues, but the source seems to be the same. 
Issue 1: I wanted to create a symlink in /var/lib/libvirt/images to /home/damglador/Games/libvirt-images, Dolphin couldn't do that. 
Issue 2: Copy path in "Open as Administrator" also copies admin://

ISSUE 1 STEPS TO REPRODUCE
1. Open /opt as Administrator
2. Try to create a symlink from it to any folder

ISSUE 1 OBSERVED RESULT
Dolphin just can't do that. I assume because it includes admin:// in symlink path

ISSUE 1 EXPECTED RESULT
Should just create the symlink

ISSUE 2 STEPS TO REPRODUCE
1. Open a folder as Administrator
2. Right-click on a file or folder and copy it's path

ISSUE 2 OBSERVED RESULT
It copies the path with admin:// at the beginning

ISSUE 2 EXPECTED RESULT
The copied path shouldn't contain admin://

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.2.5
KDE Frameworks Version: 6.10.0
Qt Version: 6.8.1

ADDITIONAL INFORMATION
What I got from copying path to /opt/discord in admin mode - admin:///opt/discord
When symlink fails to create, it throws - Unable to create symlink to admin:///opt/discord. Please check permissions (translation from Ukrainian)
Also when I open file picker in symlink create dialogue, selected folder or file also has admin:// at the beggining
Comment 1 Damglador 2025-01-22 12:26:04 UTC
I think severity should be major, but I forgot to set it.
Comment 2 Akseli Lahtinen 2025-01-22 15:39:23 UTC
Moved to kio-admin
Comment 3 John Kizer 2025-01-27 07:32:06 UTC
Hi - thanks for your bug report! I can basically reproduce this on Fedora KDE 41, although only for the case of using drag-and-drop and then choosing "Create Link". A .desktop file is created instead of the link, which functions in Dolphin's Act as Administrator mode, but isn't an actual symlink.

Creating a symlink to a root-owned location does work by going to the location you intend to hold the link, and right-clicking > choosing Create New > Link to File or Directory.
Comment 4 Damglador 2025-01-27 07:44:59 UTC
Created attachment 177709 [details]
Error from drag and drop

Oh, drag and drop also doesn't work for me. And it adds .desktop at the end of the path to source, lol. And the error message also looks weird. I attached a screenshot

There's also another issue, in admin mode "Copy path" copies the path with admin:// at the beginning, which also shouldn't happen I think, since I don't know in what way that can be useful to anyone.