Summary: | Show a better and more actionable error message when Samba shares are globally disabled or sambashares path doesn't exist on disk/isn't accessible | ||
---|---|---|---|
Product: | [Frameworks and Libraries] kdenetwork-filesharing | Reporter: | Nate Graham <nate> |
Component: | general | Assignee: | Nate Graham <nate> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | 4wy78uwh, BTJustice, code, fabian, michele.kipiel, sitter |
Priority: | NOR | Keywords: | usability |
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | https://invent.kde.org/network/kdenetwork-filesharing/commit/8a37b42000c56a23c8c83617f4f4406b370e5551 | Version Fixed In: | 22.12 |
Attachments: | Samba "net usershare add" error |
Description
Nate Graham
2020-08-10 20:55:48 UTC
ksambashare provides no api for that. it'd have to grow some. on a somewhat related matter someone ought to check out how the new registry system of samba works. as I understand one could read&write settings in a less lax fashion than fiddling the file. the real question is where to draw the line with this though? will we eventually end up rewriting the entire smb.conf to mitigate any impeding configuration a distro might have made in smb.conf? I'm counting 5 settings that could get in the way of usersharing alone, many more if we take general samba functionality into account FTR registry system is not on by default so it's not of any use to us. Created attachment 139372 [details]
Samba "net usershare add" error
It's impossible to share a location in the home folder using the share panel.
SYSTEM:
Operating System: KDE neon 5.22
KDE Plasma Version: 5.22.1
KDE Frameworks Version: 5.83.0
Qt Version: 5.15.3
Kernel Version: 5.4.0-74-generic (64-bit)
Graphics Platform: X11
Processors: 4 × Intel® Core™ i5-6200U CPU @ 2.30GHz
Memory: 7.1 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 520
For posterity: how to enable it manually: https://wiki.archlinux.org/title/samba#Enable_Usershares Enabling Samba shares requires editing /etc/samba/smb.conf, and I don't know if there is a .d folder that override files can be put in. So it unfortunately does seem like this needs to be done by the distro packaging when you install the samba server package. I have filed a thing for Fedora; See https://bugzilla.redhat.com/show_bug.cgi?id=2096405 and https://pagure.io/fedora-kde/SIG/issue/109 However we can certainly improve the error message presented to the user, pointing them at some documentation and explaining that this is the distro's responsibility. *** Bug 454021 has been marked as a duplicate of this bug. *** *** Bug 455640 has been marked as a duplicate of this bug. *** A possibly relevant merge request was started @ https://invent.kde.org/network/kdenetwork-filesharing/-/merge_requests/32 *** Bug 443588 has been marked as a duplicate of this bug. *** Git commit 8a37b42000c56a23c8c83617f4f4406b370e5551 by Nate Graham. Committed on 05/08/2022 at 14:33. Pushed by ngraham into branch 'master'. Make initial setup much clearer There are a lot of ways that initial Samba sharing setup can go wrong if the distro hasn't set up everything perfectly out of the box. Right now the wizard shows some error messages when problems are encountered, but the logic fails to account for the full set of things that can go wrong during initial setup, and as a result are sometimes displays misleading error messages that can send the user down the wrong path. This commit expands the set of conditions that are checked for, and offers more verbose and actionable error messages specific to each of them. To accomplish this, the code is refactored to move nearly all of the logic to the backend, with the QML side simply presenting the information for whatever error was encountered. The existing code already had logic for showing a friendly button to fix the "you're not a member of the right group" error condition, which is preserved here. TODOs are added in the place where other similar actions to fix the other errors could be defined, which can be done later. FIXED-IN: 22.12 M +81 -58 samba/filepropertiesplugin/groupmanager.cpp M +26 -17 samba/filepropertiesplugin/groupmanager.h M +12 -19 samba/filepropertiesplugin/qml/GroupPage.qml https://invent.kde.org/network/kdenetwork-filesharing/commit/8a37b42000c56a23c8c83617f4f4406b370e5551 |