# External Storage - SMB/CIFS not working after disabling SMBv1

**URL:** <https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326>\
**Category:** ℹ️ Support\
**Tags:** external\_storage, nc11, smb\
**Created:** [May 30, 2017, 3:20am UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326 "2017-05-30T03:20:05Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![pommetjehorlepiep](https://help.nextcloud.com/letter_avatar/pommetjehorlepiep/32/6_22734026db12803ebb3e059622ac3534.png) [@pommetjehorlepiep](https://help.nextcloud.com/u/pommetjehorlepiep)\
**Post date:** [May 30, 2017, 3:20am UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/1 "2017-05-30T03:20:05Z")

</div>

Nextcloud version _(eg, 10.0.2)_: 11.0.3  
Operating system and version _(eg, Ubuntu 16.04)_: Debian 8.0  
Apache or nginx version _(eg, Apache 2.4.25)_: 1.6.2  
PHP version _(eg, 5.6)_: 5.6  
Is this the first time you’ve seen this error?: Yes

Can you reliably replicate it? (If so, please outline steps):

1. Setup External Storage using SMB/CIFS in Nextcloud and make sure it’s working properly (i.e. you can see files etc)
2. **Disable SMBv1 protocol** use by Samba server by adding following line in **smb.conf [global]** section: **min protocol = SMB2**
3. Restart Samba daemon (systemctl restart smbd)
4. Log back in to Nextcloud and try now to access files.
5. Result: **Storage is temporarily not available**  
The issue you are facing:

The output of your Nextcloud log in **Admin \> Logging** :

> Error files\_external OCP\Files\StorageNotAvailableException: Unknown error (protocol negotiation failed: NT\_STATUS\_INVALID\_NETWORK\_RESPONSE) 2017-05-30T13:09:26+1000  
> Error files\_external OCP\Files\StorageNotAvailableException: Unknown error (protocol negotiation failed: NT\_STATUS\_INVALID\_NETWORK\_RESPONSE) 2017-05-30T13:09:26+1000  
> Fatal webdav Sabre\DAV\Exception\ServiceUnavailable: HTTP/1.1 503 Storage is temporarily not available

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

> \<?php $CONFIG = array ( 'instanceid' =\> 'instanceid', 'passwordsalt' =\> 'salt', 'secret' =\> '\*\*\*\*', 'trusted\_domains' =\> array ( 0 =\> 'nextcloud-public', 1 =\> '\*\*\*\*\*', 2 =\> '\*\*\*\*\*', ), 'datadirectory' =\> '/mnt/data', 'overwrite.cli.url' =\> 'https://nextcloud-public', 'dbtype' =\> 'mysql', 'version' =\> '11.0.3.2', 'dbname' =\> 'nextcloud\_public', 'dbhost' =\> '\*\*\*\*', 'dbtableprefix' =\> 'oc\_', 'dbuser' =\> 'public', 'dbpassword' =\> 'pwd', 'logtimezone' =\> 'UTC', 'installed' =\> true, 'memcache.local' =\> '\\OC\\Memcache\\APCu', 'theme' =\> '', 'loglevel' =\> 2, 'maintenance' =\> false, );

The output of your Apache/nginx/system log in `/var/log/ ____ `:

> 172.17.0.1 - - [15/Mar/2017:15:31:35 +1000] “GET /oc/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:35 +1000] “GET /oc-shib/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:35 +1000] “GET /nextcloud/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:35 +1000] “GET /status.php HTTP/1.0” 200 145 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:35 +1000] “GET /owncloud/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:59 +1000] “GET /nextcloud/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:59 +1000] “GET /owncloud/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:59 +1000] “GET /oc/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:59 +1000] “GET /status.php HTTP/1.0” 200 145 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”  
> 172.17.0.1 - - [15/Mar/2017:15:31:59 +1000] “GET /oc-shib/status.php HTTP/1.0” 200 12758 “-” “GuzzleHttp/6.2.1 curl/7.47.0 PHP/7.0.13-0ubuntu0.16.04.1”

---

<div class="post-metadata">

**Author:** ![chrone](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chrone/32/2788_2.png) [@chrone](https://help.nextcloud.com/u/chrone)\
**Post date:** [May 31, 2017, 12:06pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/2 "2017-05-31T12:06:29Z")

</div>

After the WannaCry vulnerability broke loose weeks ago. most companies disabled SMB v1, and sadly, Nextcloud 12 with latest php-smbclient still could not connect to Windows SMB v3 in a joined Domain.

Using smbclient commands, I could browse the DFS by using the “-m SMB3” options. Other reported ini php-smbclient’s GitHub Issues Tracker that ownCloud didn’t have this problem.

```
smbclient //dfs/Data -U domain\\chrone81 -m SMB3
smbclient //dfs/Data -U domain/chrone81 -m SMB3

```

Really looking for the fix to connect to SMB v3. 🙂

Reference:

> <https://github.com/eduardok/libsmbclient-php/issues/53>

---

<div class="post-metadata">

**Author:** ![clebourgeois](https://help.nextcloud.com/letter_avatar/clebourgeois/32/6_22734026db12803ebb3e059622ac3534.png) [@clebourgeois](https://help.nextcloud.com/u/clebourgeois)\
**Post date:** [May 31, 2017, 3:20pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/3 "2017-05-31T15:20:53Z")

</div>

try to force a minimum of smbv2

> <https://github.com/nextcloud/server/issues/4860>

---

<div class="post-metadata">

**Author:** ![clebourgeois](https://help.nextcloud.com/letter_avatar/clebourgeois/32/6_22734026db12803ebb3e059622ac3534.png) [@clebourgeois](https://help.nextcloud.com/u/clebourgeois)\
**Post date:** [May 31, 2017, 3:21pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/4 "2017-05-31T15:21:47Z")

</div>

sorry, it would not let me link…

add in global section smb.conf (/etc/samba/smb.conf)

client min protocol = SMB2  
client max protocol = SMB3

resolves issue.  
👍 1

---

<div class="post-metadata">

**Author:** ![chrone](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chrone/32/2788_2.png) [@chrone](https://help.nextcloud.com/u/chrone)\
**Post date:** [May 31, 2017, 4:10pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/5 "2017-05-31T16:10:25Z")

</div>

Thanks for the hint. It still could not work. Perhaps becasue the samba server is on Windows Domain?

Do you use full samba server or just the smbclient package? Also do you php-smbclient as well or php-smb or no php smb module at all?

---

<div class="post-metadata">

**Author:** ![clebourgeois](https://help.nextcloud.com/letter_avatar/clebourgeois/32/6_22734026db12803ebb3e059622ac3534.png) [@clebourgeois](https://help.nextcloud.com/u/clebourgeois)\
**Post date:** [May 31, 2017, 5:28pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/6 "2017-05-31T17:28:00Z")

</div>

Mine is on a windows domain. I am only using the client (smbclient) and the [cifs-utils.No](http://cifs-utils.No) php smb at all from what I can tell. I could not mount via the External Storage Support application (I would get a red dot) until I fixed the smb.conf and gave it a reboot.

---

<div class="post-metadata">

**Author:** ![chrone](https://help.nextcloud.com/user_avatar/help.nextcloud.com/chrone/32/2788_2.png) [@chrone](https://help.nextcloud.com/u/chrone)\
**Post date:** [May 31, 2017, 5:41pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/7 "2017-05-31T17:41:48Z")

</div>

Oh I see, thanks! I’ll try again later without php-smbclient enabled.

Update:  
Weird, still could not [work.Do](http://work.Do) you input the domain name in the “Domain” input box in external storage settings? Should it be [domain.com](http://domain.com) or just the domain? Used to work without even have to enter the “Domain”.

---

<div class="post-metadata">

**Author:** ![clebourgeois](https://help.nextcloud.com/letter_avatar/clebourgeois/32/6_22734026db12803ebb3e059622ac3534.png) [@clebourgeois](https://help.nextcloud.com/u/clebourgeois)\
**Post date:** [May 31, 2017, 6:58pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/8 "2017-05-31T18:58:58Z")

</div>

For me I have the server name (fully qualified), the Share folder (I only have 1 folder deep), the username (The AD username of a resource account I made for this), the password (password I set in AD for this resource account), and the domain (the entire domain name, so not “CONTOSO” but “[CONTOSO.MICROSOFT.COM](http://CONTOSO.MICROSOFT.COM)” ) When I did that and clicked the checkmark, the icon came up green.

---

<div class="post-metadata">

**Author:** ![pommetjehorlepiep](https://help.nextcloud.com/letter_avatar/pommetjehorlepiep/32/6_22734026db12803ebb3e059622ac3534.png) [@pommetjehorlepiep](https://help.nextcloud.com/u/pommetjehorlepiep)\
**Post date:** [June 4, 2017, 10:19am UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/9 "2017-06-04T10:19:00Z")

</div>

That works for me! Thx.

Is **client max protocol = SMB3** required, or is **client min protocol…** sufficient?

---

<div class="post-metadata">

**Author:** ![kundansingh27feb](https://help.nextcloud.com/user_avatar/help.nextcloud.com/kundansingh27feb/32/6972_2.png) [@kundansingh27feb](https://help.nextcloud.com/u/kundansingh27feb)\
**Post date:** [December 26, 2017, 6:44am UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/10 "2017-12-26T06:44:23Z")

</div>

May i know how you resolve this issue? Because I am not able to mount samba  
share. I have installed php-smbclient and sambaclient both but still getting the issue. Please help.

---

<div class="post-metadata">

**Author:** ![neropl](https://help.nextcloud.com/letter_avatar/neropl/32/6_22734026db12803ebb3e059622ac3534.png) [@neropl](https://help.nextcloud.com/u/neropl)\
**Post date:** [February 22, 2018, 7:11pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/11 "2018-02-22T19:11:45Z")

</div>

I’m testing Nextcloud on my network and mapping drives from server 2008 is no problem. Servers 2012 and 2016 only shares created on C drive can be mapped not other drives on server. How Nextcloud expect me to buy this for $6000 if this is not working?

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [February 22, 2018, 8:15pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/12 "2018-02-22T20:15:04Z")

</div>

This issue has been solved for the person who requested help initially.

If you discover issues in your environment, please open a new thread and describe your issue with more details and furthermore provide some server information (I suggest installing and using the app “issue template” on your server). That way we can help you much better and seek for solution.

Feel free to reference this thread right here if you want to describe what you tried already to solve your problem.

I’m closing this thread.

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [February 22, 2018, 8:15pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/13 "2018-02-22T20:15:12Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 9, 2024, 1:25pm UTC](https://help.nextcloud.com/t/external-storage-smb-cifs-not-working-after-disabling-smbv1/13326/14 "2024-12-09T13:25:40Z")

</div>


