Summary: | File copy is preserving SElinux label | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Diego <dclthrowaway1234> |
Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | CONFIRMED --- | ||
Severity: | normal | CC: | haveman_cgc, kdelibs-bugs-null, kfm-devel, madness742, nate |
Priority: | NOR | ||
Version First Reported In: | 6.9.0 | ||
Target Milestone: | --- | ||
Platform: | Fedora RPMs | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: | Screenshot of terminal's results |
Just run into this issue. Still reproducable on Fedora 42 - dolphin 25.08.0 This makes samba sharing a major pain for normal users who need to run restorecon after copying files to a shared folder. The Gnome Filemanager and terminal cp work as expected on the tested folder. I can reproduce this. As a workaround, I've created a Dolphin service menu. My use case is very simple: copy or move files to a specific folder that has the `svirt_image_t` label. This folder is used to share files with my Virtual Machines. 1. `mkdir -p ~/.local/share/kio/servicemenus` 2. `touch ~/.local/share/kio/servicemenus/copy-mv-vm.desktop` 3. `sudo chmod +x ~/.local/share/kio/servicemenus/copy-mv-vm.desktop` 4. `nano ~/.local/share/kio/servicemenus/copy-mv-vm.desktop` (make sure to replace user with your username) [Desktop Entry] Type=Service MimeType=all/all; Actions=CopyToVM;MoveToVM X-KDE-Submenu=Copy/Move to VM [Desktop Action CopyToVM] Name=Copy to VM Icon=edit-copy Exec=cp -r %F /home/user/VM; notify-send --app-name Dolphin "Copied files to shared folder." [Desktop Action MoveToVM] Name=Move to VM Icon=edit-move Exec=cp -r %F /home/user/VM && rm -r %F; notify-send --app-name Dolphin "Moved files to shared folder." Restart Dolphin and there should be a new context menu entry when selecting files/folders. Operating System: Fedora Linux 42 KDE Plasma Version: 6.4.5 KDE Frameworks Version: 6.18.0 Qt Version: 6.9.2 Kernel Version: 6.16.8-200.fc42.x86_64 (64-bit) |
Created attachment 177240 [details] Screenshot of terminal's results SUMMARY Copying a file from my home folder into another drive with a different SElinux label preserves the label of the original file, and not of the destination folder, which is not the same behavior as the terminal cp command. STEPS TO REPRODUCE 1. Copy a file from the home folder (example, /home/user/Downloads) 2. Paste it into another drive with a distinct SElinux label 3. ls -lZ and compare the labels. OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: (available in the Info Center app, or by running `kinfo` in a terminal window) Linux/KDE Plasma: Fedora 41 KDE Plasma Version: 6.2.5 KDE Frameworks Version: 6.9.0 Qt Version: 6.8.1 Kernel Version: 6.12.8-200.fc41.x86_64 (64-bit) Graphics Platform: Wayland Processors: 16 × AMD Ryzen 7 5700X3D 8-Core Processor Memory: 31.2 GiB of RAM Graphics Processor: NVIDIA GeForce RTX 3070/PCIe/SSE2 ADDITIONAL INFORMATION