Owncloud external samba storage errors

Steps to reproduce

  1. Owncloud 10.11.0
  2. Attempt to add external Samba storage through web ui

Expected behaviour

Expectation is that Owncloud successfully mounts the external samba share. This occurred successfully in past versions; though I’m not entirely sure when it stopped working.

Actual behaviour

The web ui indicated that an error occurred. Opening the log file shows the following error message:
{“reqId”:“XXX”,“level”:3,“time”:“2023-02-19T12:47:02+00:00”,“remoteAddr”:“x.x.x.x”,“user”:“XXX”,“app”:“PHP”,“method”:“PUT”,“url”:“/index.php/apps/files_external/globalstorages/2”,“message”:“Undefined offset: 1 at /pathto/webroot/owncloud-10.11.0/apps/files_external/3rdparty/icewind/smb/src/Native/NativeFileInfo.php#46”}

Server configuration

Operating system: Centos Stream Release 9

Web server: Apache

Database: MariaDB

PHP version: 7.4.33

ownCloud version: 10.11.0

Updated from an older ownCloud or fresh install: Updated from a previous 10.x version

The content of config/config.php:

<?php $CONFIG = array ( 'instanceid' => '', 'passwordsalt' => '', 'secret' => '', 'trusted_domains' => array ( 0 => 'owncloud.domain.com', ), 'datadirectory' => '/path/to/owncloud-data', 'apps_paths' => array ( 0 => array ( 'path' => '/path/to/owncloud.domain.com/apps', 'url' => '/apps', 'writable' => true, ), ), 'overwrite.cli.url' => 'http://owncloud.domain.com', 'dbtype' => 'mysql', 'version' => '10.11.0.6', 'dbname' => 'name', 'dbhost' => 'host', 'dbtableprefix' => 'oc_', 'dbuser' => 'user', 'dbpassword' => 'pass', 'installed' => true, 'mail_from_address' => 'admin', 'mail_smtpmode' => 'php', 'mail_domain' => 'domain.com', 'theme' => '', 'maintenance' => false, 'loglevel' => 2, 'trashbin_retention_obligation' => 'auto', 'appstore.experimental.enabled' => false, 'memcache.local' => '\\OC\\Memcache\\APCu', 'filelocking.enabled' => true, 'memcache.locking' => '\\OC\\Memcache\\Redis', 'redis' => array ( 'host' => 'localhost', 'port' => 6379, 'timeout' => 0, 'password' => '', 'dbindex' => 0, ), 'allow_user_to_change_mail_address' => '', );

Need more logs. There seems to be a problem getting the dos attributes of the file, but without more logs we don’t know the cause.

That’s the only log message I could find. Are you asking for an increased log level for more detail?

Not working with Samba 4.17.5 · Issue #98 · eduardok/libsmbclient-php · GitHub might be related. If that’s the case, I don’t think we can do anything until the issue in the library is fixed. Meanwhile, you could try to downgrade the library.

Ah, good find. I do indeed have version 4.17.5 installed at the moment. I’ll look for an update first and then consider the patch suggested in the other thread.

Thanks!

Quick update, this resolved the issue for me.

dnf downgrade libsmbclient-4.17.2 --allowerasing
systemctl restart php-fpm.service
1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.