Package: nbd-server Version: 1:3.16.2-1 Severity: normal Dear Maintainer,
I configured nbd-server in /etc/nbd-server/conf like so: [generic] # If you want to run everything as root rather than the nbd user, you # may either say "root" in the two following lines, or remove them # altogether. Do not remove the [generic] section, however. user = nbd group = nbd includedir = /etc/nbd-server/conf.d allowlist = true # What follows are export definitions. You may create as much of them as # you want, but the section header has to be unique. [crypt-server-backup] exportname = /dev/sda6 # authfile = /etc/nbd-server/allow-crypt-server-backup flush = true fua = true I then connected with nbd-client from another machine (debian jessie) like so: $ sudo nbd-client -name crypt-server-backup shi /dev/nbd0 Negotiation: ..Error: Read failed: End of file Exiting. nbd-client could not connect, since (on server:) $ sudo systemctl status nbd-server.service ● nbd-server.service - LSB: Network Block Device server Loaded: loaded (/etc/init.d/nbd-server; generated; vendor preset: enabled) Active: active (running) since Thu 2017-12-28 22:35:12 CET; 40s ago Docs: man:systemd-sysv-generator(8) Process: 3515 ExecStart=/etc/init.d/nbd-server start (code=exited, status=0/SUCCESS) Tasks: 1 (limit: 4915) CGroup: /system.slice/nbd-server.service └─3525 /bin/nbd-server Dez 28 22:35:12 shi nbd-server[3515]: nbd-server. Dez 28 22:35:12 shi systemd[1]: Started LSB: Network Block Device server. Dez 28 22:35:49 shi nbd_server[3525]: Spawned a child process Dez 28 22:35:49 shi nbd_server[4530]: virtstyle ipliteral Dez 28 22:35:49 shi nbd_server[4530]: connect from 192.168.1.22, assigned file is /dev/sda6 Dez 28 22:35:49 shi nbd_server[4530]: No authorization file, granting access. Dez 28 22:35:49 shi nbd_server[4530]: Could not open exported file /dev/sda6: Permission denied Dez 28 22:35:49 shi nbd_server[4530]: Exiting. Dez 28 22:35:49 shi nbd_server[4530]: Modern initial negotiation failed Dez 28 22:35:49 shi nbd_server[3525]: Child exited with 1) While investigating this, I even did a sudo addgroup nbd Diskussion on the server and rebooted, but this did not help. I expected the nbd-server to actually serve the device /dev/sda6 as network block device to the client. Actually it does if I do not configure the nbd-server to run as user=nbd, group=nbd. Thanks for developing and maintaining nbd. Regards, Gregor -- System Information: Debian Release: buster/sid APT prefers testing APT policy: (500, 'testing') Architecture: i386 (i686) Kernel: Linux 4.14.0-2-686-pae (SMP w/2 CPU cores) Locale: LANG=en_US.UTF-8, LC_CTYPE=de_DE.utf8 (charmap=UTF-8), LANGUAGE=en_US:en (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages nbd-server depends on: ii adduser 3.116 ii debconf [debconf-2.0] 1.5.65 ii libc6 2.25-5 ii libglib2.0-0 2.54.2-4 ii libgnutls30 3.5.16-1 ii ucf 3.0036 nbd-server recommends no packages. nbd-server suggests no packages. -- debconf information: * nbd-server/number: 1 * nbd-server/port: 2000 nbd-server/convert: true nbd-server/autogen: * nbd-server/name: crypt-server-backup * nbd-server/useports: true * nbd-server/filename: /dev/sda6