Summary: | The owner and group of a file end up being changed to "root" if it's used for example: kdesudo kate FILE | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Ganton <kubry> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED DUPLICATE | ||
Severity: | normal | CC: | ilmari.lauhakangas, vijit |
Priority: | NOR | ||
Version: | 5.0.0 | ||
Target Milestone: | --- | ||
Platform: | Ubuntu | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Ganton
2016-04-24 19:44:35 UTC
If the file is not owned by root, why are you using a root account to edit it? For example some files are scripts in /usr/local/bin, scripts owned by root, but with a group that is not root; if those files are edited with kdesudo kate, then the group is not respected (and so the group of those files ends up being root, too). I got the similar problem. I created the file from PHP, owner "www-data", access mode "0644". Then I open it in Kate under my account (user: Vijit, sudoers group, inter alia). Inspite of I haven't access to write, I can do it in Kate! And after saving the changes the owner of this file changes too. It become "vijit". I suppose, Kate creates the backup file (*.kate-swp) with owner of me, of course, and then changes the original one on saving. So, I believe, we got an access violation here. This is a duplicate of bug #333577. If you want to edit files as root, please follow: https://blog.martin-graesslin.com/blog/2017/02/editing-files-as-root/ In short, use: SUDO_EDITOR=kwrite sudoedit <file> Commit: https://cgit.kde.org/kate.git/commit/?id=9adcebd3c2e476c8a32e9b455cc99f46b0e12a7e Discussion: git.net/ml/kwrite-devel/2016-01/msg00011.html Of course, in general, the problem with changing file owner still exists, see duplicate report. *** This bug has been marked as a duplicate of bug 333577 *** |