Bug 454021

Summary: Show a better and more actionable error message when the sambashares path doesn't exist on disk or isn't accessible
Product: [Frameworks and Libraries] kdenetwork-filesharing Reporter: `{third: "Beedell", first: "Roke"}`{.JSON5} <4wy78uwh>
Component: generalAssignee: Unassigned bugs mailing-list <unassigned-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal CC: kfm-devel, nate, sitter
Priority: NOR Keywords: usability
Version: unspecified   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Attachments: Pictographic depiction of what Dolphin states.

Description `{third: "Beedell", first: "Roke"}`{.JSON5} 2022-05-19 00:22:21 UTC
Created attachment 148980 [details]
Pictographic depiction of what Dolphin states.

SUMMARY
Similarly to `http://bugs.kde.org/show_bug.cgi?id=351699` states, the Share tab is unavailable by default, and inoperative when the necessary package is manually added.

STEPS TO REPRODUCE
0. Observe subsequent instruction and consequently install necessary software.
1. Install `http://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Server/x86_64/iso/`. Invoke:
2. `env bash`
3. `env ssh $(ps -u -p 1 | tail -n 1 | awk '{print $1}')@localhost`.
4. Authenticate.
5. Invoke `env dnf check-update --refresh`.
7. Invoke `env dnf upgrade`.
8. Invoke `env systemctl reboot`.
9. Invoke `env dnf install kdenetwork-filesharing`.

OBSERVED RESULT
Attached to the report. `http://i.stack.imgur.com/39l9o.png` additionally depicts what the picture depicts.

EXPECTED RESULT
Dolphin should provide what `http://cdn.kde.org/screenshots/kdenetwork-filesharing/kdenetwork-filesharing.png` depicts.

SOFTWARE/OS VERSIONS
Windows: Negative.
macOS: Negative.
Linux/KDE Plasma: Positive.
KDE Plasma Version: 5.24.5.
KDE Frameworks Version: 5.94.0.
Qt Version: 5.15.3.

ADDITIONAL INFORMATION
Configuration of such basic functionality via text-files and textual commands should obviously not be necessary.
Comment 1 Nate Graham 2022-05-19 17:27:07 UTC
Urgh, yeah, I get it on Fedora too. This error message should really tell the user what *exactly* the problem is and how they can fix it. And if they can't, because it's a distro setup bug, it should tell them that too, and direct them to the distro bug report page, as Discover does in situations like this.
Comment 2 `{third: "Beedell", first: "Roke"}`{.JSON5} 2022-05-20 16:25:59 UTC
(In reply to Nate Graham from comment #1)
> Urgh, yeah, I get it on Fedora too. This error message should really tell
> the user what *exactly* the problem is and how they can fix it. And if they
> can't, because it's a distro setup bug, it should tell them that too, and
> direct them to the distro bug report page, as Discover does in situations
> like this.

I wholeheartedly agree. I am thankful for your comment, because this is bothersomely problematic.
Comment 3 Harald Sitter 2022-06-11 17:16:28 UTC
Is testparm installed?
Comment 4 Nate Graham 2022-06-11 17:28:34 UTC
Yes:


$ testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

[I pressed enter]

# Global parameters
[global]
        printcap name = cups
        security = USER
        workgroup = SAMBA
        idmap config * : backend = tdb
        cups options = raw


[homes]
        browseable = No
        comment = Home Directories
        inherit acls = Yes
        read only = No
        valid users = %S %D%w%S


[printers]
        browseable = No
        comment = All Printers
        create mask = 0600
        path = /var/tmp
        printable = Yes


[print$]
        comment = Printer Drivers
        create mask = 0664
        directory mask = 0775
        force group = @printadmin
        path = /var/lib/samba/drivers
        write list = @printadmin root
Comment 5 Harald Sitter 2022-06-11 17:34:17 UTC
I feel like this is a variant of bug #425202 what happens if you actually enable usershares properly? From what I can see the only reason this cryptic message appears is if neither the share group nor the share path can be located - or simply put the plugin doesn't know what's wrong
Comment 6 Nate Graham 2022-06-11 20:11:06 UTC
Not sure. I added "usershare max shares = 100" to the [global] section of /etc/samba/smb.conf and rebooted, but it didn't change anything.
Comment 7 Nate Graham 2022-06-11 20:11:34 UTC
Was that the right way to do it, or is something else required?
Comment 8 Harald Sitter 2022-06-11 21:22:28 UTC
I honestly don't know I've only ever used distributions that set this stuff up. Not doing so in 2022 seems like a crime in its own right :(
Comment 9 `{third: "Beedell", first: "Roke"}`{.JSON5} 2022-06-11 23:20:21 UTC
If "kdenetwork-filesharing" is installed, merely a cog is currently presented to me within the Share tab rather than the previously stated text. I have reinstalled my installation of Fedora, and I utilize Rawhide, so I expect that the default configuration of the operating-system and the code of the relevant packages is significantly different to what they were when I initially reported this problem.

If useful, invocation of "testparm" by me provides:

[root@1653307616 /]# testparm
Load smb config files from /etc/samba/smb.conf
Loaded services file OK.
Weak crypto is allowed

Server role: ROLE_STANDALONE

Press enter to see a dump of your service definitions

# Global parameters
[global]
	printcap name = cups
	security = USER
	workgroup = SAMBA
	idmap config * : backend = tdb
	cups options = raw


[homes]
	browseable = No
	comment = Home Directories
	inherit acls = Yes
	read only = No
	valid users = %S %D%w%S


[printers]
	browseable = No
	comment = All Printers
	create mask = 0600
	path = /var/tmp
	printable = Yes


[print$]
	comment = Printer Drivers
	create mask = 0664
	directory mask = 0775
	force group = @printadmin
	path = /var/lib/samba/drivers
	write list = @printadmin root
[root@1653307616 /]#
Comment 10 `{third: "Beedell", first: "Roke"}`{.JSON5} 2022-06-11 23:22:06 UTC
(In reply to BEEDELL ROKE JULIAN LOCKHART from comment #9)
> If "kdenetwork-filesharing" is installed, merely a cog is currently
> presented to me within the Share tab rather than the previously stated text.
> I have reinstalled my installation of Fedora, and I utilize Rawhide, so I
> expect that the default configuration of the operating-system and the code
> of the relevant packages is significantly different to what they were when I
> initially reported this problem.
> 
> If useful, invocation of "testparm" by me provides:
> 
> [root@1653307616 /]# testparm
> Load smb config files from /etc/samba/smb.conf
> Loaded services file OK.
> Weak crypto is allowed
> 
> Server role: ROLE_STANDALONE
> 
> Press enter to see a dump of your service definitions
> 
> # Global parameters
> [global]
> 	printcap name = cups
> 	security = USER
> 	workgroup = SAMBA
> 	idmap config * : backend = tdb
> 	cups options = raw
> 
> 
> [homes]
> 	browseable = No
> 	comment = Home Directories
> 	inherit acls = Yes
> 	read only = No
> 	valid users = %S %D%w%S
> 
> 
> [printers]
> 	browseable = No
> 	comment = All Printers
> 	create mask = 0600
> 	path = /var/tmp
> 	printable = Yes
> 
> 
> [print$]
> 	comment = Printer Drivers
> 	create mask = 0664
> 	directory mask = 0775
> 	force group = @printadmin
> 	path = /var/lib/samba/drivers
> 	write list = @printadmin root
> [root@1653307616 /]#

...The label has reappeared, so ignore that section. I suppose that loading the configuration of Samba immediately subsequent to installation of the necessary package required some time.
Comment 11 Nate Graham 2022-06-13 18:29:01 UTC
For posterity: how to enable it manually: https://wiki.archlinux.org/title/samba#Enable_Usershares
Comment 12 Nate Graham 2022-06-13 18:33:50 UTC

*** This bug has been marked as a duplicate of bug 425202 ***