Bug 402568 - Copied files are owned by the group of original file
Summary: Copied files are owned by the group of original file
Status: RESOLVED FIXED
Alias: None
Product: dolphin
Classification: Applications
Component: general (other bugs)
Version First Reported In: 18.04.3
Platform: Kubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-25 22:12 UTC by FrancisH
Modified: 2018-12-28 16:27 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description FrancisH 2018-12-25 22:12:47 UTC
SUMMARY
If the current user is part of group root and issued at least once a "sudo -s" command the files that are further copied will be keeping their original group.

STEPS TO REPRODUCE
1. Add user to group root and reboot
2. Type sudo -s in Konsole
3. Create a file somewhere in $HOME using right clic or copy / paste.

OBSERVED RESULT
Copied file is owned by default user but original owner group
Ex: if a file owned by root:root is copied into the user "joe" home directory it will be owned by joe:root.

EXPECTED RESULT
File copy should be owned by "joe:joe"

SOFTWARE/OS VERSIONS
Windows: 
MacOS: 
Linux/KDE Plasma: Kubuntu 18.10 / kernel 4.18.0-13
(available in About System)
KDE Plasma Version: 5.14.4
KDE Frameworks Version: 5.52.0
Qt Version: 5.11.1

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2018-12-27 00:52:10 UTC
I don't understand the significance of step 2; it should have no impact on step 3. Does the issue still happen if yo omit step 2? And before step 3, are you opening Dolphin and doing the copy there?
Comment 2 FrancisH 2018-12-27 08:31:30 UTC
I checked again and indeed step 2 isn't needed (actually step2 was together with the reboot after adding user to group root, hence my mistake).

So to reproduce:
Add user to group root (sudo adduser joe root)
Reboot
Create a file within Dolphin main window using right click and create new file
OR
Drag / copy a file within Dolphin from for /etc for instance to /home/joe (split window).
OR
Right click on Desktop and create new file and whatever file.

File is created in /home/joe with "root" group.

In my opinion all three options are ultimately based on a file copy funtion keeping the original group.

New file creation in Konsole is working properly (owner is joe:joe)

The issue disappears when I remove the user from group "root" and reboot.
Comment 3 Nate Graham 2018-12-28 16:27:23 UTC
Hmm, cannot reproduce.

If I add my user account to the "root" group and reboot, files created in Dolphin have the correct group.

Let's call it fixed, and if you can reproduce the issue with Dolphin 18.12.x and/or KDE Frameworks 5.54, please re-open. Thanks!