Samba Nautilus-Share funktioniert nicht mehr

Moin , ich habe seit langer Zeit ein Manjaro mit Gnome Desktop laufen ,jetzt auf einmal funktionieren meine Samba Shares nicht mehr.

Zusätzlich kann ich im Filemanager auch keine Ordner mehr freigeben.
wenn ichs versuche bekomme ich im File Manager folgende Meldung.
“»net usershare« gab den Fehler 255 zurück”.

smb / nmb service laufen

die smbconf ist die Standard aus dem “manjaro-settings-samba” Paket.
Ich habe schon mehrere Sachen aus der Arch Wiki probiert ohne Erfolg.

Aufgefallen wars mir erst als ich von einer virtuellen Maschine (Qemu) Datein rüber schieben wollte.

1 Like

Hallo @hucky und willkommen :wink:

Prüf mal bitte, ob es neue “pac”-Dateien gibt. Wenn du wirklich nichts geändert hast, dann gibt es wahrscheinlich Veränderungen in der Konfiguration. Diese Änderungen werden als pacnew Datei gespeichert.

pacdiff -o

Aber ich denke das hat mit der Rechtevergabe zu tun. Sowas wie das hier solltest du in der smb.conf des Servers haben:

[share]
comment = Share lots of files
path = /media/share
public = yes
writable = yes

Moin ich habe gestern auf meinen Laptop auch Gnome Desktop den selben Fehler bekommen
“»net usershare« gab den Fehler 255 zurück” in Nautilus.

Habe danach mal ne frische VM mit Gnome aufgesetzt selber Fehler.
Habe folgendes gemacht bei der frischen VM.
https://wiki.manjaro.org/index.php/Using_Samba_in_your_File_Manager

Hab dann mal bei der VM auf KDE Plasma geswitcht und dann in dolphin funktioniert es sofort.
Scheint ein Fehler in Nautilus Gnome zu sein?

Megavolt bei pacdiff -o

/etc/libvirt/qemu.conf.pacnew
/etc/samba/smb.conf.pacsave
/etc/samba/smb.conf.pacsave.1
/etc/samba/smb.conf.pacsave.2
/etc/samba/smb.conf.pacsave.3
/etc/pacman.conf.pacnew

ps meine shares in Gnome in /var/lib/samba/usershare sind noch vorhanden.

Die Shares in /var/lib/samba/usershare funktionieren wieder.
Allerdings ist das sharing mit Gnome /Nautilus immer noch broken bei mir.
Auch bei einer frischen Installation.

»net usershare« gab den Fehler 255 zurück”

Wie gesagt KDE / Plasma / Dolphin rennt das.

Do a diff between all those files and incorporate all the new values from all the .pacsave files into your smb.conf and do that for all .pacnew and .pacsave files

If that still doesn’t solve the issue, please post the new full smb.conf.

P.S. Zu mude um gut :de: zu schreiben… :yawning_face:

Ich denke nicht das es an der smb.conf liegt vielmehr scheinen Nautilus die Rechte zu fehlen?
Und wie schon erwähnt bei einer “neu” Installation (Gnome) is der Fehler identisch.
Einziger Unterschied is das Desktop Enviorment (Kde funktioniert).
smb.confs sind identisch.

ps die smb.conf ist unverändert aus den Paketquellen

Bitte, ganzen inhalt von /etc/samba/smb.conf?

:thinking:

You might also try and see if Avahi is running on the Gnome system.I had an issue awhile back where Nautilus would not show the networks and KDE had no issues. I could type smb://ipaddress in connect to server on Gnome and connect to all the other networks.Once i started and enabled Avahi it shows all the other networks.

1 Like

This is the Content of the smb.conf.
The File is identical on Host as Client VM Machine.
Its the standard “manjaro-settings-samba” Package

[global]
   workgroup = WORKGROUP
   dns proxy = no
   log file = /var/log/samba/%m.log
   max log size = 1000
   client min protocol = SMB2
   server role = standalone server
   passdb backend = tdbsam
   obey pam restrictions = yes
   unix password sync = yes
   passwd program = /usr/bin/passwd %u
   passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully*
   pam password change = yes
   map to guest = Bad Password
   usershare allow guests = yes
   name resolve order = lmhosts bcast host wins
   security = user
   guest account = nobody
   usershare path = /var/lib/samba/usershare
   usershare max shares = 100
   usershare owner only = yes
   force create mode = 0070
   force directory mode = 0070
   load printers = no
   printing = bsd
   printcap name = /dev/null
   disable spoolss = yes
   show add printer wizard = no

[homes]
   comment = Home Directories
   browseable = no
   read only = yes
   create mask = 0700
   directory mask = 0700
   valid users = %S

[printers]
   comment = All Printers
   browseable = no
   path = /var/spool/samba
   printable = yes
   guest ok = no
   read only = yes
   create mask = 0700

[print$]
   comment = Printer Drivers
   path = /var/lib/samba/printers
   browseable = yes
   read only = yes
   guest ok = no

KDE Dolphin Integration works out of the Box.
Gnome on my Host Machine as on my Client VM (fresh intall) the Nautilus Share fails.

when this Guide is used

https://wiki.manjaro.org/index.php/Using_Samba_in_your_File_Manager#Sharing_Files_from_the_File_Manager

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