Bug 18043 - kwrite overrides file permissions when saving changes
Summary: kwrite overrides file permissions when saving changes
Status: NEW
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:
URL:
Whiteboard: MGA6TOO
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-20 18:41 CET by Frédéric Buclin
Modified: 2017-07-27 02:48 CEST (History)
2 users (show)

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


Attachments

Description Frédéric 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 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 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 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 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:

https://phabricator.kde.org/D4634


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...

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