Bug 427767

Summary: Merged file permissions not consistent with original
Product: [Applications] kompare Reporter: Maverick <basic89>
Component: generalAssignee: Kompare developers <kompare-devel>
Status: REPORTED ---    
Severity: major    
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Maverick 2020-10-15 16:07:48 UTC
SUMMARY
When saving file after merge, the permissions of the file might change. This can easily result in a broken system when used to merge files in /etc under su, like when managing .pacnew in Arch Linux and is therefore a severe problem.

STEPS TO REPRODUCE
1. Touch a file test.txt and change group and others permissions in some way
2. Compare test.txt with another file, apply a difference and save
3. Check permissions of test.txt. 

OBSERVED RESULT
test.txt permissions always end up "-rw-------", no matter what they were set to in 1. Note, that those are also not the default permissions as were after initial touch.

EXPECTED RESULT
Permissions should be identical to in 1.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch / 5
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1