diff --git a/CHANGELOG.md b/CHANGELOG.md index 94745f6..956663c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,10 @@ Die Version steht an genau einer Stelle: `src/netmover/__init__.py`. ## [Unreleased] +### Geändert +- Klartext-Hinweis bei `mount error(95)` (keine gemeinsame SMB-Version) mit + Synology-Einstellung; aufgefallen bei der Anbindung des echten NAS. + ## [0.1.1] – 2026-10-10 Korrekturen aus dem ersten Praxistest auf einer Debian-13-VM mit echten diff --git a/README.md b/README.md index a89631e..ea945b4 100644 --- a/README.md +++ b/README.md @@ -327,6 +327,7 @@ findmnt -R /mnt/netmover # was ist wirklich eingehängt? |---|---| | `mount error(13): Permission denied` (CIFS) | Benutzer oder Passwort falsch, oder keine Rechte auf die Freigabe. | | `mount error(2): No such file or directory` | Freigabename falsch geschrieben (Groß/klein!). | +| `mount error(95): Operation not supported` | Keine gemeinsame SMB-Version (im Kernel-Log: „Dialect not supported by server“). Am NAS das maximale SMB-Protokoll auf SMB3 stellen oder Zusatzoption `vers=2.0`. | | `mount error(112): Host is down` | NAS nicht erreichbar, oder SMB1 erwartet: `vers=3.0` bzw. `vers=2.1` probieren. | | `… helper program` / `unknown filesystem type` | `apt install cifs-utils nfs-common` | | `Operation not permitted` / `only root can do that` | Kein `CAP_SYS_ADMIN`: unprivilegierter LXC oder Docker ohne `cap_add`. | diff --git a/src/netmover/mounting/linux.py b/src/netmover/mounting/linux.py index 832ce6b..bcfa081 100644 --- a/src/netmover/mounting/linux.py +++ b/src/netmover/mounting/linux.py @@ -58,6 +58,13 @@ def explain_mount_error(fstype: str, message: str) -> str: if "helper program" in low or "unknown filesystem type" in low: pkg = "cifs-utils" if fstype == "cifs" else "nfs-common" hint = f"Das Paket „{pkg}“ fehlt: apt install {pkg}" + elif fstype == "cifs" and ("error(95)" in low or "operation not supported" in low): + hint = ( + "Server und Client finden keine gemeinsame SMB-Version. Am besten am NAS " + "SMB2/SMB3 erlauben (Synology: Systemsteuerung → Dateidienste → SMB → " + "Erweiterte Einstellungen → Maximales SMB-Protokoll: SMB3). Alternativ " + "Zusatzoption vers=2.0 – vers=1.0 nur im Notfall, SMB1 ist unsicher." + ) elif "permission denied" in low and fstype == "cifs": hint = "Benutzername/Passwort falsch oder der Benutzer hat keine Rechte auf die Freigabe." elif "permission denied" in low or "access denied by server" in low: diff --git a/tests/test_linux_backend.py b/tests/test_linux_backend.py index ffb6821..fa4dd3b 100644 --- a/tests/test_linux_backend.py +++ b/tests/test_linux_backend.py @@ -110,6 +110,12 @@ def test_is_mounted_reads_mountinfo(tmp_path: Path) -> None: ), ("nfs4", "mount.nfs4: access denied by server while mounting nas:/x", "NFS-Berechtigungen"), ("cifs", "mount error(112): Host is down", "nicht erreichbar"), + # Praxisfall: Synology mit „Maximales SMB-Protokoll: SMB2“ + ( + "cifs", + "mount error(95): Operation not supported\nRefer to the mount.cifs(8) manual page", + "vers=2.0", + ), ("cifs", "mount: only root can do that", "CAP_SYS_ADMIN"), ], )