Nextcloud SMB not connecting on other drives

Hello we are IT-Supporters at a school.

Nextcloud version (eg 20.0.5): 21.0.0
Operating system and version (eg, Ubuntu 20.04): Ubuntu 20.04.2 LTS
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4
PHP version (eg, 7.4): 7.4.3

Issue
On our windows file server (windows server 2012R2) we have several shares which are located on different drives.

For exampe: D:\Share, E:\Share

Nextcloud can’t connect to SMB Shares which are on these drives.

If the share is on the C: Drive everything works as intended.

Config in Nextcloud

Is there a solution for this problem?

Thanks in advance

Dear IT-Service guys… welcome to the user-forum of NC.

first thing everyone should do on a forum before opening a new thread is: searching for already existing threads on the forum.

By sheer conincidence I do remember some threads where exactly THAT was asked already. one of which - with a possible solution (mount external drives in OS first) is in german here…

1 Like

Hallo JimmyKater

Wir danken dir für deine Rückmeldung.

Dieser Thread ist uns bekannt, jedoch handelt es sich hier ja lediglich um einen temporären Workaround.
In unserer jetzigen im Einsatz befindlichen Nextcloud mit Version 14 funktionieren die SMB Shares problemlos.

Aber wie es scheint, müssen wir uns mit dem Workaround zufrieden geben.

  • IT-Service

oder jemand eröffnet ein Issue bei Github (und checkt, ob nicht ein änlicher Issue schon existiert)… :nerd_face:

Wir konnten jetzt doch noch SMB zum laufen bringen!

Lösung / Solution:

  • apt install smbclient → war bei unserem Fall natürlich schon installiert
  • apt install libsmbclient-dev
  • apt install php-dev
  • nano /etc/php/7.4/mods-available/smbclient.ini → extension=smbclient.so
  • phpenmod -v ALL smbclient
  • pecl install smbclient
  • systemctl restart apache2

Mit diesen Paketen und der smbclient.ini Datei kann nun wieder ein Share von einem anderen Laufwerk welches nicht C:\ ist, verbunden werden.

1 Like