Bug 18043 - kwrite overrides file permissions when saving changes
Summary: kwrite overrides file permissions when saving changes
Alias: None
Product: Mageia
Classification: Unclassified
Component: RPM Packages (show other bugs)
Version: Cauldron
Hardware: All Linux
Priority: High major
Target Milestone: Mageia 6
Assignee: KDE maintainers
QA Contact:
Whiteboard: MGA6TOO
Depends on:
Reported: 2016-03-20 18:41 CET by Frédéric "LpSolit" Buclin
Modified: 2020-02-28 22:21 CET (History)
3 users (show)

See Also:
Source RPM: kwrite-16.12.3-2.mga6
Status comment:


Description Frédéric "LpSolit" Buclin 2016-03-20 18:41:33 CET
In Cauldron, I edited a file whose permissions were root.apache using kwrite. On save, file permissions were reset to root.root, making the configuration file unreadable by Apache.
David Walser 2016-03-21 10:10:36 CET

Assignee: bugsquad => mageia

Samuel Verschelde 2016-08-25 16:23:27 CEST

Assignee: mageia => kde

Comment 1 Nicolas Lécureuil 2017-03-15 15:57:45 CET
is it still valid with current cauldron ?

CC: (none) => mageia

Comment 2 Frédéric "LpSolit" Buclin 2017-04-16 22:58:51 CEST
(In reply to Nicolas Lécureuil from comment #1)
> is it still valid with current cauldron ?

Yes, I can still reproduce with kate-16.12.3-2.mga6.src.rpm.

Source RPM: kate-15.12.3-1.mga6.src.rpm => kate-16.12.3-2.mga6.src.rpm

Frédéric "LpSolit" Buclin 2017-07-18 21:54:28 CEST

Source RPM: kate-16.12.3-2.mga6.src.rpm => kwrite-16.12.3-2.mga6

Barry Jackson 2017-07-19 10:30:27 CEST

CC: (none) => zen25000

Comment 3 Barry Jackson 2017-07-19 10:47:13 CEST
This probably explains why I had permissions changed from root:apache to root:root last week (just before Mga6 release).
I had been editing a zoneminder configuration file. (using Kate I suspect as it's my usual editor of choice).
Comment 4 Frédéric "LpSolit" Buclin 2017-07-27 00:56:36 CEST
Pfff... I just broke Bugzilla due to this bug, because kwrite reverted file permissions from root.apache to root.root, making some files unreadable by apache.

Whiteboard: (none) => MGA6TOO
Target Milestone: --- => Mageia 6
Priority: Normal => High

Comment 5 Frédéric "LpSolit" Buclin 2017-07-27 02:48:22 CEST
For the record, it's no longer possible to use kate/kwrite as root in Cauldron:

# kwrite .bashrc 
Executing KWrite as root is not possible. To edit files as root use:
SUDO_EDITOR=kwrite sudoedit <file>

KDE enforced this in 17.04, see:


This means we won't get any help from upstream to fix this bug. :(

Note: sudoedit doesn't fit my workflow, because changes are copied into the original file only when you quit kate/kwrite. Saving changes while keeping the application opened will only save changes into the copy of the original file, not in the original file itself. Looks like I will have to find another text editor...
Comment 6 Thomas Andrews 2020-02-28 01:39:45 CET
I just stumbled onto this bug while searching for something else. 

I can tell you that somewhere along the line the decision about running various GUI apps like Kwrite and Dolphin as root was reversed. I just ran Kwrite as root within Mageia 7, with no problem whatsoever.

So perhaps somebody should check to see if this bug is still valid.

CC: (none) => andrewsfarm

Comment 7 Frédéric "LpSolit" Buclin 2020-02-28 22:21:50 CET
Yes, this is fixed in Mageia 7.

Resolution: (none) => FIXED

Note You need to log in before you can comment on or make changes to this bug.