SUMMARY *** Editing a txt file using kio-admin slave changes its permissions. *** STEPS TO REPRODUCE 1. Create a text file owned by the root user. 2. Set r/w access permission on the file to the root user only (sudo chmod og-rwx) (ls -l shows '-rw------- 1 root root') 3. Edit the text file with Kate text editor using admin://...path to file, write something, save changes. OBSERVED RESULT File permissions have been changed, the file in now readable by other users/groups (ls -l shows '-rw-r--r-- 1 root root'). EXPECTED RESULT File permissions should be left unchanged. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Plasma Version: 5.27.5 KDE Frameworks Version: 5.106.0 Qt Version: 5.15.9 ADDITIONAL INFORMATION
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1337
Git commit b939a68f166db3d29bb900884d713084cc415751 by Méven Car, on behalf of Harald Sitter. Committed on 07/07/2023 at 07:07. Pushed by meven into branch 'master'. file: preserve mode on put this prevents us from losing owner/group or mode on overwriting put operations M +25 -0 src/kioworkers/file/file.cpp https://invent.kde.org/frameworks/kio/-/commit/b939a68f166db3d29bb900884d713084cc415751
Git commit aa5732dccb2fc82c3a30fce63d6e80339bb021fa by Harald Sitter. Committed on 07/07/2023 at 09:17. Pushed by sitter into branch 'kf5'. file: preserve mode on put this prevents us from losing owner/group or mode on overwriting put operations (cherry picked from commit b939a68f166db3d29bb900884d713084cc415751) M +25 -0 src/ioslaves/file/file.cpp https://invent.kde.org/frameworks/kio/-/commit/aa5732dccb2fc82c3a30fce63d6e80339bb021fa