Some Linux distros (e.g. Arch) require that users whose folders are used as Samba shares be added to the sambashare group. We should detect when this is not the case and offer to fix it and then reboot (on Linux, group changes require a reboot).
I'm not sure that's strictly speaking true. The user needs to have write access to the usershare directory so they can create the definition file for the share. We could equally kauth the writing of that file and bypass the group aspect entirely. In fact that may give a much better experience as group assignments need a relog to apply to the session before being able to do anything.
A possibly relevant merge request was started @ https://invent.kde.org/network/kdenetwork-filesharing/-/merge_requests/9
Git commit 371c590c4dcc61f258f2ab7849f6d5e9ce782cc5 by Harald Sitter. Committed on 27/08/2020 at 10:07. Pushed by sitter into branch 'master'. add a group management page to edit usershares the user needs to be member of the appropriate group. detect when that is not the case (dir is not writable) and offer automatic group management if at all viable (dir isn't group owned by root and the group looks like something samba related). to visualize this there's a new group page which is run after installation and also on every start (it does a fairly cheap check; never the less it is equipped with busy indication). should the user not be able to write the usershare directory the user can ask us to ask the kauth helper to make the necessary changes. the entire backing logic is inside a groupmanager helper class that evaluates the group status of the user this also moves the reboot function back out of the samba installer into the plugin. the group management also needs to reboot (or at least re-log) to apply the changes so we need a more global way to issue reboots FIXED-IN: 20.12 M +1 -0 samba/filepropertiesplugin/CMakeLists.txt M +47 -0 samba/filepropertiesplugin/authhelper.cpp M +1 -0 samba/filepropertiesplugin/authhelper.h A +104 -0 samba/filepropertiesplugin/groupmanager.cpp [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] A +41 -0 samba/filepropertiesplugin/groupmanager.h [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] M +6 -0 samba/filepropertiesplugin/org.kde.filesharing.samba.actions A +68 -0 samba/filepropertiesplugin/qml/GroupPage.qml [License: GPL(3+eV) GPL(v3.0) GPL(v2.0)] M +6 -1 samba/filepropertiesplugin/qml/InstallPage.qml M +2 -4 samba/filepropertiesplugin/qml/RebootPage.qml M +1 -1 samba/filepropertiesplugin/qml/UserPage.qml M +12 -1 samba/filepropertiesplugin/qml/main.qml M +1 -0 samba/filepropertiesplugin/qml/qml.qrc M +0 -8 samba/filepropertiesplugin/sambainstaller.cpp M +0 -1 samba/filepropertiesplugin/sambainstaller.h M +11 -0 samba/filepropertiesplugin/sambausershareplugin.cpp M +1 -0 samba/filepropertiesplugin/sambausershareplugin.h https://invent.kde.org/network/kdenetwork-filesharing/commit/371c590c4dcc61f258f2ab7849f6d5e9ce782cc5