Open properties dialog for a folder. Then open extended permissions dialog. Set option "GID" and press OK. Result: GID bit is not set. If GID bit was set before it will be cleared. Reproducible: Always
Example: Folder test has user foo and group bar. In a terminal: chmod g+s test Open properties dialog in dolphin for test as normal user. Open extended permissions dialog. The GID is shown unchecked. Start dolphin with kdesudo. Open properties dialog for test. Open extended permissions dialog. GID option is shown checked. Leave it checked and press OK and press OK again. Then check in terminal->GID bit is cleared.
Can confirm this one. Present on KDE Neon 5.7.2, Dolphin ver.16.04.3
Thanks for the bug report! Can you please tell us your KDE Frameworks version?
plasma-framework 5.23.0-0ubuntu1~ubuntu16.04~ppa1
(In reply to Martin from comment #4) > plasma-framework 5.23.0-0ubuntu1~ubuntu16.04~ppa1 Thanks! I'll reassign it to KIO because the properties dialog is provided by KIO.
Looks similar to bug 366177
*** Bug 366177 has been marked as a duplicate of this bug. ***
Ok, I found it. The bug is actually in the file:/ KIO slave. It does QFile::setPermissions and has a modeToQFilePermissions which converts POSIX flags like S_IRUSR to QFile::ReadOwner. Unfortunately, it nowhere takes into account S_ISVTX and other special attributes so they get lost. Wpw. I also don't see a way to do this with QFile.
Patch https://phabricator.kde.org/D7230
you meant https://phabricator.kde.org/D7326 ?:)
Of course :) thanks
Git commit 9ac7832b859bfcbc88448c4ae0f6dc14b2d54a06 by Kai Uwe Broulik. Committed on 15/08/2017 at 12:41. Pushed by broulik into branch 'master'. [File KIO slave] Fix applying special file attributes QFile does not support special attributes like sticky. This would cause us to always discard them. Differential Revision: https://phabricator.kde.org/D7326 M +20 -0 autotests/jobtest.cpp M +3 -0 autotests/jobtest.h M +5 -0 src/ioslaves/file/file.cpp https://commits.kde.org/kio/9ac7832b859bfcbc88448c4ae0f6dc14b2d54a06
AFAIK, Qt doesn't provide any functionality to handle UNIX (and therefore also Linux) extended file attributes. Therefore, AFAIK, for the case of UNIX, Apple MAC and Linux (and Android?), the extended file attributes (file metadata) can only be managed by means of the (C library) system calls dealing with file metadata management -- the 'stat' and 'chmod' system call families.
I ifdef'd it using ::chmod for UNIX, didn't check whether this actually covers Mac but in any case better than the status quo.