ownCloud 9.1.1: "Storage not available"

redis
external_storage
9.1.x
help

#1

Note: I am using Redis for memcache and file-locking, not APCu.

Please help us by providing the following info. Before posting please also check the pinned "Known issues" threads and make sure that you're running the latest available version for your oC release: https://owncloud.org/changelog/

Steps to reproduce
1. User logs into web interface
2. Attempts to access SMB share via External Storage app
3. "Storage not available" error appears -- no files are displayed

Expected behaviour
Tell us what should happen
User should be able to access files/folders for what they have permission via Active Directory security groups

Actual behaviour
Tell us what happens instead
Users receive "Storage not available" error

Server configuration
Operating system: Ubuntu Server 14.04.5
Web server: Apache 2.4.7
Database: MySQL 5.5.52-0ubuntu-.14.04.1
PHP version: PHP 7.0.11-1+deb.sury.org~trusty+1 (cli) ( NTS )
ownCloud version (see ownCloud admin page): 9.1.1
Updated from an older ownCloud or fresh install: Fresh install of ownCloud appliance as VHDX in Hyper-V

ownCloud config.php:
<?php
$CONFIG = array (
'updatechecker' => false,
'instanceid' => 'oc8n1g4f4q1k',
'trusted_domains' =>
array (
0 => 'localhost',
1 => 'REDACTED',
),
'passwordsalt' => 'REDACTED',
'secret' => 'REDACTED',
'datadirectory' => '/var/www/owncloud/data',
'overwrite.cli.url' => 'https://localhost/owncloud',
'dbtype' => 'mysql',
'version' => '9.1.1.3',
'dbname' => 'oc',
'dbhost' => 'localhost',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_admin',
'dbpassword' => 'REDACTED',
'logtimezone' => 'UTC',
'installed' => true,
'memcache.local' => '\OC\Memcache\Redis',
'filelocking.enabled' => 'true',
'memcache.distributed' => '\OC\Memcache\Redis',
'memcache.locking' => '\OC\Memcache\Redis',
'redis' =>
array (
'host' => 'localhost',
'port' => 6379,
'timeout' => 0,
'dbindex' => 0,
),
'mail_smtpmode' => 'smtp',
'mail_from_address' => 'REDACTED',
'mail_domain' => 'REDACTED',
'mail_smtpsecure' => 'tls',
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpauth' => 1,
'mail_smtphost' => 'REDACTED',
'mail_smtpport' => '587',
'mail_smtpname' => 'REDACTED',
'mail_smtppassword' => 'REDACTED',
'ldapIgnoreNamingRules' => false,
);

ownCloud log (data/owncloud.log, see https://central.owncloud.org/t/how-to-find-webserver-or-oc-logfile-enable-php-logfile/808):

{"reqId":"zTSJS0be73wtiuImnypz","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$
{"reqId":"79RvQeTlX9Lw5AHwGzoe","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$
{"reqId":"E4j75S70R327nMPUdU6k","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$
{"reqId":"gfQqAUUM9Y6pGZL2Jvx5","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$
{"reqId":"SkNRisIgi5enYiM162QD","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$
{"reqId":"mMI7btHXZKFNQ\/WzhrIS","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/$
{"reqId":"E+i9WbWGnz1+mEEVw7xk","remoteAddr":"192.168.9.1","app":"files_external","message":"Exception: {\"Exception\":\"OCP\\Files\\StorageNotAvailableException\",\"Message\":\"Invalid login\",\"Code\":0,\"Trace\":\"#0 \\/var\\/w$

Special configuration (external storage, external authentication, reverse proxy, server-side-encryption):

Integrity status for oC9+

Login as admin user into your ownCloud and access
http://example.com/index.php/settings/integrity/failed
paste the results here. "No errors have been found."

#2

Installed https://github.com/eduardok/libsmbclient-php

?

If yes create a new bugreport at the github bugtracker.


#3

@RealRancor

I've attempted to install it, but have not been able to get past this step: Activate libsmbclient-php in php.ini:
extension="smbclient.so"

The smbclient.so file doesn't exist. Do I need to create this from scratch? Once created or located, do I then add extension="smbclient.so" to /etc/php/7.0/apache2/php.ini ?


#4

Hi,

the linked page has all needed install instructions. If this page is missing infos or steps please ask for more at the issue tracker of that library.


#5

I just wanted to add that smbclient is not available on many shared webhosters so the External Storage oC feature is not activable. I hope PHP 8+ includes the necessary Samba related functions natively.


#6

I have the same problem. When I added the external storage, SMBCIFS I get the green dot on the left, and the SMB folder, but when I try to access my samba server I get the message 'Storage not available'

Using oC 9.1.1 on Ubuntu 16.04.

Can't make sense of https://github.com/eduardok as a relative newbie in this area.


#7

Hello,

My configuration:
Docker ownCloud 9.1 - https: //hub.docker.com/_/owncloud/
Docker nginx reverse proxy - https: //hub.docker.com/r/jwilder/nginx-proxy/
Docker letsencrypt - https: //hub.docker.com/r/jrcs/letsencrypt-nginx-proxy-companion/

I had the same problem as joseph. And he's right. The instructions leave a lot to be desired for those who don't make their living off computer admin. The following should help get those with some admin knowledge pointed in the right direction.

PECL (https: //pecl.php.net/) is an PHP extension repository.

pecl install smbclient

is the command issued on the command line to install

smbclient

If your ownCloud server is configured like mine was you'll get the following error after attempting to install smbclient:

configure: error: Could not find libsmbclient.h

See https: //github.com/eduardok/libsmbclient-php/issues/42 to learn how to defeat the error. The cliff notes version is:

You need to install package libsmbclient-dev. That is the package that provides libsmbclient.h.

Then comes the problem of modifying php.ini with:

extension="smbclient.so"

Where the F is php.ini located? See https: //www.ostraining.com/blog/coding/phpini-file/ to find out how to identify where php.ini is located.

The output will look something like the following:

php.ini was not initially in /usr/local/etc/php/conf.d. Creating the file is a simple matter of using the touch command and then a text editor (https: //itsfoss.com/command-line-text-editors-linux/) to insert:

extension="smbclient.so"

After restarting ownCloud and getting the necessary smb server information entered correctly external storage works like a champ.

Regards,
Jake

P.S. Sorry about the formatting of the web links. The "man" doesn't trust new users with more than two hyperlinks.


Storage not available for pre authorised
#8

Thanks jpstaub.

I have smbclient in the system... but then you lost me as I am a newbie!

Joseph


#9

You're welcome joseph. As you're new the following will be used to establish a reference point so I can assist further:

Since you've managed to install smbclient I'm assuming you're familiar with the command line as well as the concept of admin privileges. If not, swing by this Digital Ocean tutorial for a quick primer. The instructions above are accomplished as the root user or as a user with admin (sudo) privileges. I'll continue on with the understanding that you're operating as root. Operating as a sudoer a preface of sudo for command line entries is required. As an example:

sudo apt-get update

Instead of guessing at what you're having problems with please tell me where you're stuck in the How to Find the Location of Your php.ini File instructions. We'll go from there.

Jake


#10

Hi again...

OK... I'm stuck at this line in How to find the location of your php.ini file instructions:

Upload this file to the public_html directory or whatever your main HTML directory is called.

When I browse my opencloud server with https:/ 192.168.0.101 ( which is the internal ip ) I get a reply that the Apache web server is working ( i knew that ) and that the file is at /var/www/html/index.html.

Should I upload that php file in that directory?

I can also see ( in the section called Document Roots ) that access is only allowed through the web browser to files located in the /var/www, public_html directories (when enabled) and /usr/share (for web applications). My shared file is located in another directory! Does that matter too?

Thanks.

Joseph


#11

Hello joseph,

Place the php file in the following directory:

/var/www/html

After placing the php file in the directory above you should be able to browse to:

https:// 192.168.1.101/phpinfo.php

The output should be as described in previous instructions.

Regarding question #2: lets see if we can solve problem #1 first with the way the system currently stands.

Regards,
Jake


#12

OK. Done.

So now I have to create a php.ini file ( user? Permissions? ) in /etc/php/7.0/apache2/conf.d with the line

extension="smbclient.so"

Joseph