[SOLVED] Probleme to connect external ressources in nextcloud SMB / CIFS

Hi,

I have a problem to connect external resources in nextcloud.
Nextcloud 15 and Ubuntu server 18.04.2 LTS
From Nextcloud, I do not connect to resources via smb.
From the command line it connects to smb without any problem.
You can see both of them in the picture.
Do you know what a problem can be?

1 Like

Looking at your screenshot, I noticed you have a path (/srvfiles) in the host field, but that should be the ip address or hostname to your SMB/CIFS share. So maybe all you need to do is take out the forward slash?

Same error…

I heve this message in nextcloud.log

"File":"\/var\/www\/nextcloud\/apps\/files_external\/3rdparty\/icewind\/smb\/src\/Exception\/Exception.php","Line":30,"CustomMessage":"Error while getting file info"}

Ok. Is the SMB server on a different host, or are they both on the same machine/VM? You can also try using the IP address.

If I recall correctly, you should also take out the forward slash from the path on the second field.

The SMB server is a different host (Netapp).

Same error…

Ok can you try instead of “//192.168.26.136” just “192.168.26.136”?

I have the same error

Have you tried without specifying the domain? I use this with freenas and only specify my freenas hostname (freenas.mydomain.local), share folder, username and password.
In order to troubleshoot further I think you’d want to check for error logs on the SMB server.

Maybe the SMB connection test app will help you finding the root cause of the problem.

2 Likes

Don’t use //name or /name. Use “/” as the root folder. For example above.

First box - name of your server or IP address = srvfiles or 192.168.26.136
Second box - / or folder name = NextCloud_test (devices usually case sensitive)
Third box - / or folder name = /

Hope this helps.

Finally I went through a local mount point, and it works in the state.

Thanks

SMB access has not worked correctly in two years.

i have exactly the same problem with nextcloud 17 on Ubuntu 18.04
with nextcloud 15 on ubuntu 16.04.6 it works fine

this was my solution:
i had ubuntu 16.04.6 with nextcloud 15
i installed php 7.2 on ubuntu 16.04.6


and i installed all the missing modules for php7.2
then i could update my Nextcloud from v15 -> v16 -> v17

the SMB shares, that were already configured worked, but i couldn’t add new shares in the webinterface
it still works with cli though:
sudo -u www-data php /var/www/nextcloud/occ files_external:create MYNEXTCLOUDMOUNTPOINTNAME smb password::logincredentials -c host=MYHOSTNAME -c share=MYSHARENAME