NextCloud SMB/CIFS not working

NethServer Version: NethServer release 7.3.1611 (Final)
Module: NextCloud 11.0.2

Don’t know if this is a bug so I hope I’m posting this in the right category…
As I’m no expert, maybe this is just something I’m doing wrong.

I’m trying to use “SMB/CIFS” from “External Storages”. No matter if the credentials are right or wrong, or if I’m trying to connect to localhost or other SMB on my local network, the green circle always shows up, and when I try to access the folder, the message “Storage is temporarily not available” comes up.
The error message in NextCloud Logging doesn’t seem very helpful “Error, files_external, OCP\Files\StorageNotAvailableException: Unknown error (stdbuf: invalid option – ‘W’ Try ‘stdbuf --help’ for more information.)”.
If I try to connect with smbclient directly, all goes well.
I’ve seen some similar problems in “OwnCloud” forums where people talk about “php5-smbclient”. Tried all of that to no effect…

Has anyone gone through this problem or has any ideas?!
Thank you and forgive my poor English…

Indeed it’s a bug, but don’t know who is to blame.
@greavette and myself had/have the same problem, but so far no solution that I know.

Saw same reports in owncloud and nextcloud, and I’m tracking some of those bug reports.

and a few more with similar reports.

Thank you for replying.
I’ll try to investigate this problem even further.

Just gave it another go. Can you try if it works for you after issuing these commands?

yum install sclo-php56-php-smbclient samba-client
systemctl restart rh-php56-php-fpm.service
1 Like

I’m sorry for taking so long.

One thing I’ve noticed from NextCloud 11 manual: “PHP 5.6 is the minimum supported version. We recommend to deploy on PHP 7 if possible”.
We are running PHP 5.4 in NethServer. Could all just be it? Probably that is why you told me to try install those above.

In the meanwhile, I’ve installed NextCloud in:

  • Ubuntu 16.04 x64 - just installed all the required dependencies and everything went well;
  • ClearOS 7 - had to upgrade from PHP 5.4 to 5.6, install samba-client and everything went well.

Now I’ll try what you proposed and get back at you.

There is the stock php 5.4 version, and installing Nextcloud 11 will bring php 5.6 as a dependency but from SCL (software collections) repository, allowing different versions of php to be run on the same server.

The above commands will install optional packages that supposedly are not essential to run Nextcloud but required to use some of its features/apps.

  • Fresh NethServer install;
  • Installed updates;
  • Installed WebServer;
  • Installed NextCloud;
  • Installed dependencies as you instructed.

All OK now.
Thank you!!!

Don’t know if there’s another/better way to do this but this is how I’ve got it to work. Probably something like a symlink would be better than SMB.
In case this might help someone…

If you use LDAP / AD integration with NextCloud and want to give users access to their “Home Folder”, in NextCloud, goto to Admin -> External Storage and create a new mount with these settings:

  • Folder name = Whatever you want
  • Add storage = SMB / CIFS
  • Credentials = Log-in credentials, save in session
  • Host = localhost
  • Share = homes
  • Remote subfolder = \
  • Domain = Your Domain

@neurodesigns, @dnutan do you think we should add this RPM as nextcloud dependency?

If it’s possible, yes.

As @dnutan said… Thanks!

Added to the todo-list!

Sadly I’m not successful using @dnutan added instructions. :frowning: I’m still getting errors with trying to access my smb share from our NAS.

I did a bit more digging and found on the ownCloud site this logged issue:

The above issue says to install libsmbclient-php. I’m not sure what the CentOS version of this install is and is it safe to install this with my Nethserver/Nextcloud?


Sheesh…had I read @dnutan post more closely I see that my issue I found was already posted! Sorry for the double post of this issue.

So @dnutan… does your added instructions mean the libsmbclient is installed?

Thank you.

Do what @dnutan said: yum install sclo-php56-php-smbclient samba-client
Then reboot your server and try to connect your SMB again.
Let us know…

If you are using Nextcloud 11 with php 5.6, then the instructions should work.
Yes, a php wrapper for libsmbclient will be installed.

I installed Nextcloud 11 from the nethserver software center…I didn’t do any special installs for php 5.6 (except for what @dnutan mentioned I install).

Still no love for connecting to my NAS. Would be nice to get through this bug but I have been thinking it’s probably better to move my documents directly into Nextcloud and move away from this aging NAS.

If you have other suggestions of how I can get this fixed I’ll take a look.


If you try to connect through smbclient directly, does it work?

1 Like

Just fixed two installations following @dnutan’s instructions. @giacomo I confirm we need them

Would you like to open the issue and a PR? :smiling_imp: