Samba Nautilus-Share funktioniert nicht mehr

Try NT1 instead of SMB2 first. If that does not help, set it back to SMB2 and provide:

the most recent log entry that corresponds with the fail.

:thinking:

smbd.log

[2021/10/08 20:39:08.636373,  0] ../../source3/smbd/server.c:1738(main)
  smbd version 4.15.0 started.
  Copyright Andrew Tridgell and the Samba Team 1992-2021

This is the last log (Virt Machine) Error 255 is identical to Main Machine
Samba Sharing itself runs with Configs in /var/lib/samba/usershare just fine

1 Like

You don’t have a firewall running, have you???

Because now your config is identical to mine, but I’ve got my firewall turned off as I’m home…

:face_with_monocle:

1.The Error with Nautlis was first on my Main Machine.
2.I reproduced the Error with a blank Gnome install in a Qemu VM.
3.The only Thing I changed in the Machine
https://wiki.manjaro.org/index.php/Using_Samba_in_your_File_Manager
4.There is no Firewall or any other Change to the Base Install.

Bildschirmfoto von 2021-10-06 18-18-29

@hucky Da du usershare benutzt, vielleicht eine dumme Frage, aber bist du Mitglied der Gruppe sambashare ?

Ist auch das Verzeichnis /var/lib/samba/usershare ein Mitglied der Gruppe sambashare ?

Ich bestehe darauf, dass es zu 100% ein Problem mit der Rechteverwaltung ist.


@hucky Since you use usershare, maybe a stupid question, but are you a member the group sambashare ?

Also is the dir /var/lib/samba/usershare a member of sambashare ?

I insist that there is 100% a problem with the permissions management.

1 Like

Bin in sambashare Mitglied.

groups                                                        
network power vboxusers sambashare users storage lp input audio wheel autologin hucky     

Was mich halt irretiert hab schon mehere Manjaro Gnome Machinen installiert und mit dem Punkt nie Ärger gehabt.

Was mich halt wundert ist das in einer VM Installation der Fehler reproduzierbar ist. (Gnome)
Kde Desktop Enviorment ändern zack gehts.

Ja ich glaub dir das. Nautlius und Dolphin benutzen ihre eigenen Plugins. Das hat weniger mit Gnome zu tun… Ich wette, wenn du Dolphin installierst unter Gnome dann wird es auch “Zack” funktionieren? :thinking:

Check mal bitt die Rechte im Ordner:

stat /var/lib/samba/usershare
1 Like

Hab mal eben rumexpermentiert mit den Rechten also von root bis Standard User die Rechte des Orderns geändert.

Fehler in Nautilus bleibt.

@hucky Also ich habe es auf eine Live Sitzung mal selbst getestet und kann das Problem zu 100% verifizieren, aber es ist tatsächlich ein Problem der Erweiterung nautilus-share, denn auf der Kommandozeile kann ich es normal verwenden mit net usershare. Dazu kommt noch das die Erweiterung archiviert ist und scheinbar nicht weiterentwickelt bzw. betreut wird: Archive / nautilus-share · GitLab

Also alles in allem, gibt es die Erweiterung, aber jetzt scheint diese kaputt zu sein mit dieser Nautilus Version.

Alternativ könnte man nemo verwenden, das eigentlich die selbe Erweiterung nemo-share hat. Nemo ist ein Nautilus Fork.

Das gut zu wissen mit Nemo.
Hab in meinem Umfeld mehren Personen alten Laptops und Pc mit Ssds und Manjaro zu einem 2ten Leben verholfen.
Wenn ich den sag mach das mal eben in einem Terminal…na denn gute Nacht.

Danke erstma

@hucky Ich wäre auch daran interessiert, dass es funktioniert, da es nur eine GUI für net usershare ist, sollte sich das beheben lassen. Also was ich vermute ist folgendes:

Wenn ich den Namen Videos nach video ändere kommt eine interessate Nachricht:

'net usershare' returned error 255: [2021/10/11 01:09:27,  0] ../../lib/util/debug.c:1108(reopen_one_log)
  reopen_one_log: Unable to open new log file 'videos/log.net': No such file or directory
net usershare add: share name /home/manjaro/videos contains invalid characters (any of %<>*?|/\+=;:",)

Ich vermute hier mal, dass aus welchen Gründen auch immer, der Pfad als “share name” verwendet wird, anstatt videos. Das resultiert in diesen Fehler, da im “share name” keine Schrägstriche / verwendet werden können. Also Versucht die GUI den Pfad als share name zu verwenden. Ich schau mir das mal genauer an die Tage und berichte, falls ich eine Lösung finde in Form eines Patches.

Update

Das Problem war einfacher als gedacht… es hatte mit dem Parameter -l und --long zu tun.

Also hier mal der Fehler:

$ net usershare add -l share ~/Videos "comment" "Everyone:R" guest_ok=n
[2021/10/11 01:49:18,  0] ../../lib/util/debug.c:1108(reopen_one_log)
  reopen_one_log: Unable to open new log file 'share/log.net': No such file or directory
net usershare add: share name /home/manjaro/videos contains invalid characters (any of %<>*?|/\+=;:",)

Aber so funktioniert es:

$ net usershare add --long share ~/Videos "comment" "Everyone:R" guest_ok=n
[share]
path=/home/manjaro/Videos
comment=comment
usershare_acl=Everyone:R,
guest_ok=n

Also hab ich einfach die Parameter in shares.c geändert und es funktioniert wieder…

Wird wohl eine Änderung in samba sein, dass das das verursacht. Mehr weiß ich gerade nicht. Auf jeden Fall hier mal der Patch und das PKGBUILD:

Dateiname: 001-parameter_fix.patch

--- shares.c	2009-12-09 10:42:09.000000000 +0000
+++ shares_fix.c	2021-10-11 02:17:53.061229610 +0000
@@ -622,7 +622,7 @@
 		return FALSE;
 
 	argv[0] = "add";
-	argv[1] = "-l";
+	argv[1] = "--long";
 	argv[2] = info->share_name;
 	argv[3] = info->path;
 	argv[4] = info->comment;

Dateiname: PKGBUILD

# Maintainer: Balló György <ballogyor+arch at gmail dot com>
# Contributor: Nevar <psi.neamf@gmail.com>

pkgname=nautilus-share
pkgver=0.7.3
pkgrel=10
pkgdesc='Nautilus extension to share folder using Samba'
arch=('x86_64')
url="https://git.gnome.org/browse/nautilus-share"
license=('GPL')
depends=('nautilus' 'samba')
makedepends=('intltool')
source=("https://download.gnome.org/sources/$pkgname/${pkgver%.*}/$pkgname-$pkgver.tar.xz"
		"001-parameter_fix.patch")
sha256sums=('1686b1c3f9f2b4b35bcb0fc9f826f89e540d1e5fee8eb64806a8d31e3db55ad5'
            '087d0f97461d69507430316b391a12a658e6fe8888d85c56c5cff202ec0b50e9')

prepare() {

cd $pkgname-$pkgver/src/

patch -Np0 -i ../../001-parameter_fix.patch

}


build() {
  cd $pkgname-$pkgver
  ./configure --prefix=/usr
  make
}

package() {
  cd $pkgname-$pkgver
  make DESTDIR="$pkgdir" install
}

Quelle: svntogit-community/PKGBUILD at packages/nautilus-share · archlinux/svntogit-community · GitHub

Diese beiden Dateien anlegen in einen neuen Ordner und dann einfach im Terminal zu diesen wechseln und mittels makepkg -si bauen lassen und installieren.

Könntest du das mal ausgiebig testen? Zumindest erscheint bei mir keine Fehlermeldung mehr.

3 Likes

Jupp funzt jetzt.
Musste noch durchs ganze rumbastelen paar andere “Fehler” fixen.

1 Like

The issue isn’t with nautilus-share, the net command is part of smbclient.

Das Problem liegt nicht bei nautilus-share, der net-Befehl ist Teil von smbclient.

The -l or --long switches are both valid:

Die Schalter -l oder --long sind beide gültig:

❯ net help usershare add
net usershare add [-l|--long] <sharename> <path> [<comment>] [<acl>] [<guest_ok=[y|n]>]
	Adds the specified share name for this user.
	<sharename> is the new share name.
	<path> is the path on the filesystem to export.
	<comment> is the optional comment for the new share.
	<acl> is an optional share acl in the format "DOMAIN\name:X,DOMAIN\name:X,...."
	<guest_ok=y> if present sets "guest ok = yes" on this usershare.
		"X" represents a permission and can be any one of the characters f, r or d
		where "f" means full control, "r" means read-only, "d" means deny access.
		name may be a domain user or group. For local users use the local server name instead of "DOMAIN"
		The default acl is "Everyone:r" which allows everyone read-only access.
	Add -l or --long to print the info on the newly added share.

I can reproduce the error with the -l switch, but not the --long switch.

Ich kann den Fehler mit dem -l-Schalter reproduzieren, aber nicht mit dem --long-Schalter.


Translated from English to German with Google Translate

Übersetzt aus dem Englischen ins Deutsche mit Google Translate

1 Like

Thanks for answering here @Yochanan and confirming that it is reproduceable. However I have not much expertise to say where this bug of smbclient is exactly located, but changing the parameter at the extension is for now a workaround.

I know that both parameter should be valid, but why so ever, the short one does not work.

Der Samba Server startet gar nicht. Hab eine komplette Neuinstallation. Ich krieg auch den 255er im Nautilus Dialog. Wenn ich ein sudo systemctl start samba versuche kommt das:

Okt 26 13:44:20 KalandraLinux samba[9528]: samba version 4.15.0 started.
Okt 26 13:44:20 KalandraLinux samba[9528]: Copyright Andrew Tridgell and the Samba Team 1992-2021
Okt 26 13:44:20 KalandraLinux samba[9528]: daemon_status: daemon 'samba' : Starting process...
Okt 26 13:44:20 KalandraLinux samba[9528]: At this time the 'samba' binary should only be used for either:
Okt 26 13:44:20 KalandraLinux samba[9528]: 'server role = active directory domain controller' or to access the ntvfs file server with 'server services = +smb' or the rpc proxy with 'dcerpc endpoint servers = remote'
Okt 26 13:44:20 KalandraLinux samba[9528]: You should start smbd/nmbd/winbindd instead for domain member and standalone file server tasks
Okt 26 13:44:20 KalandraLinux samba[9528]: exit_daemon: daemon failed to start: Samba detected misconfigured 'server role' and exited. Check logs for details, error code 22
Okt 26 13:44:20 KalandraLinux systemd[1]: samba.service: Main process exited, code=exited, status=1/FAILURE

Hab einige Foren-Beträge gefunden wo man die smb.config verändern soll. Finde es aber merkwürdig wenn hier ein Samba-Server ausgeliefert wird, der in der default Konfiguration gar nicht läuft.

Hab mich an das hier gehalten: Using Samba in your File Manager - Manjaro

Die Samba Config so ist in Ordnung. Nur wenn Du einen Activ Directory Server beitreiben würdest, muss dies angepasst und aktiviert werden. Zum “normalen” freigeben und durchsuchen von Samba Shares muss Samba Server nicht aktiviert sein.

Siehe hier : Samba AD Daemon fail to start

The same applies to all other sharing plugins for file managers that apparently use -l instead of --long.
I can reproduce that with thunar-shares-plugin as well.
Thanks a lot to all here, in particular to @megavolt for elaboration and for the patch. With that patch, thunar-shares-plugin works again, too!

Apparently, this is an error in the documentation. The -l switch apparently means something like log file and is not an abbreviated version of the --long switch.
I am just wondering why this has not been noticed by anybody else, in particular, the smbclient developers.

The net man page, although also erroneously mentioning

 -l|--long
           When listing data, give more information on each item.

also has this one:

-l|--log-basename=logdirectory
           Base directory name for log/debug files. The extension ".progname" will be appended (e.g. log.smbclient, log.smbd, etc...). The log file is never
           removed by the client.

Clearly an error in the documentation.

1 Like

@DAC324 Thanks for pointing out the incorrect documentation. Seems like the code has changed but not the documentation.

@Yochanan Finally added the solution to the arch bug tracker as a comment: FS#72642 : [nautilus-share] Does not work and the upstream project link shows that the repository is archived.

I hope it will be fixed soon.

1 Like