Bug 385596 - Kate not respecting setgid bit on file
Summary: Kate not respecting setgid bit on file
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (other bugs)
Version First Reported In: 17.04.2
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-10-11 11:58 UTC by csbugs
Modified: 2018-08-18 09:15 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description csbugs 2017-10-11 11:58:07 UTC
Trying to use Kate to edit a file, e.g. called mktest.sh, i experienced an 
unexpected behaviour:

The directory and file is owned by another user, but i as member of a common group should be able to edit the file if the group id bit (s) is set:

3775 drwxrwsr-t   user1  engineers  /home/shared/admin
775 -rwxrwxr-x   user1 engineers  /home/shared/admin/mktest.sh

Another user2, who is in group engineers, should generally be able to edit file mktest.sh although he cannot move it.
For reference see https://en.wikipedia.org/wiki/Setuid#sticky_bit_with_GUID

Using emacs, gedit or vi user2 can do that, while kate/kwrite/kile are denying user2 to edit the file.

This happens on Opensuse Leap 42.3 using
- Kate 17.04.2-1.6
- Plasma 5.8.7
- plasma-framework 5.32-0-4.1
- libQt5.6.2-6.1
- kdelibs-4.14.33
Comment 1 Christoph Cullmann 2018-08-18 09:15:16 UTC
Remove QSaveFile in favor of plain old file saving

Summary: Rationale: for many use cases that e.g. have acls, complex other extended attributes, static links e.g. the rename() doesnt do the trick it should other ways would be start to add workarounds to all cases, which is hard, e.g. if that is something shared via SMB...

Test Plan: make && make test

Reviewers: dhaumann, dfaure

Reviewed By: dhaumann, dfaure

Subscribers: dfaure, kwrite-devel, kde-frameworks-devel

Tags: #kate, #frameworks

Differential Revision: https://phabricator.kde.org/D14890