Nextcloud version: 23.0.0
Operating system and version: Linux 5.4.0-91 running in Docker
Apache or nginx version: Apache/2.4.51
PHP version : 8.0.13
The issue you are facing:
I connected to a external storage via sftp when I try to create a file or folder it does create the folder or file but I get PHP errors telling me it tried to access a array offset on value of type bool (about five times the same error).
My ftp server is running vsftpd and connecting from the terminal works fine so
I would guess it’s a PHP problem?
Is this the first time you’ve seen this error?: Y
Steps to replicate it:
- Connect to external storage in nextcloud app over sftp using password and username
- Try to create a file or delete one in the external storage
The output of your Nextcloud log in Admin > Logging:
[PHP] Error: Trying to access array offset on value of type bool at /var/www/html/apps/files_external/lib/Lib/Storage/SFTP.php#330
MKCOL /remote.php/dav/files/USERNAME/SFTP/restore_points
from 31.164.225.151 by USERNAME at 2021-12-12T11:08:07+00:00
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'htaccess.RewriteBase' => '/',
'memcache.local' => '\\OC\\Memcache\\APCu',
'apps_paths' =>
array (
0 =>
array (
'path' => '/var/www/html/apps',
'url' => '/apps',
'writable' => false,
),
1 =>
array (
'path' => '/var/www/html/custom_apps',
'url' => '/custom_apps',
'writable' => true,
),
),
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'redis',
'password' => '',
'port' => 6379,
),
'instanceid' => ID,
'passwordsalt' => SALT,
'secret' => SECRET,
'trusted_domains' =>
array (
0 => '192.168.1.98:8080',
1 => DOMAIN,
),
'datadirectory' => '/var/www/html/data',
'dbtype' => 'pgsql',
'version' => '23.0.0.10',
'overwrite.cli.url' => 'http://192.168.1.98:8080',
'overwriteprotocol' => 'https',
'dbname' => 'nextcloud',
'dbhost' => 'db',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => UESRNAME,
'dbpassword' => PASSWORD,
'installed' => true,
'default_phone_region' => 'DE',
'maintenance' => false,
);
here is the full Nextcloud error
/var/www/html/apps/files_external/lib/Lib/Storage/SFTP.php - line 334:
OC\Log\ErrorHandler::onError(2, "Trying to access array offset on value of type bool at /var/www/html/apps/files_external/lib/Lib/Storage/SFTP.php#334", "/var/www/ht ... p", 334)
/var/www/html/lib/private/Files/Storage/Common.php - line 114:
OCA\Files_External\Lib\Storage\SFTP->filetype("restore_points")
/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php - line 114:
OC\Files\Storage\Common->is_dir("restore_points")
/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php - line 114:
OC\Files\Storage\Wrapper\Wrapper->is_dir("restore_points")
/var/www/html/lib/private/Files/Storage/Wrapper/Availability.php - line 131:
OC\Files\Storage\Wrapper\Wrapper->is_dir("restore_points")
/var/www/html/lib/private/Files/Storage/Wrapper/Wrapper.php - line 114:
OC\Files\Storage\Wrapper\Availability->is_dir("restore_points")
/var/www/html/lib/private/Files/View.php - line 1171:
OC\Files\Storage\Wrapper\Wrapper->is_dir("restore_points")
/var/www/html/lib/private/Files/View.php - line 379:
OC\Files\View->basicOperation("is_dir", "/SFTP/restore_points")
/var/www/html/lib/private/Files/Filesystem.php - line 634:
OC\Files\View->is_dir("/SFTP/restore_points")
/var/www/html/lib/private/Files/Node/HookConnector.php - line 235:
OC\Files\Filesystem::is_dir("/SFTP/restore_points")
/var/www/html/lib/private/Files/Node/HookConnector.php - line 104:
OC\Files\Node\HookConnector->getNodeForPath("/SFTP/restore_points")
/var/www/html/lib/private/legacy/OC_Hook.php - line 106:
OC\Files\Node\HookConnector->write({ run: true, ... "})
/var/www/html/lib/private/Files/View.php - line 1284:
OC_Hook::emit("OC_Filesystem", "write", { run: true, ... "})
/var/www/html/lib/private/Files/View.php - line 1154:
OC\Files\View->runHooks([ "create","write"], "/SFTP/restore_points")
/var/www/html/lib/private/Files/View.php - line 271:
OC\Files\View->basicOperation("mkdir", "/SFTP/restore_points", [ "create","write"])
/var/www/html/apps/dav/lib/Connector/Sabre/Directory.php - line 188:
OC\Files\View->mkdir("/SFTP/restore_points")
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 1210:
OCA\DAV\Connector\Sabre\Directory->createDirectory("restore_points")
/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php - line 560:
Sabre\DAV\Server->createCollection("files/USERNAME/SFTP/restore_points", Sabre\DAV\MkCol {})
/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php - line 89:
Sabre\DAV\CorePlugin->httpMkcol(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 472:
Sabre\DAV\Server->emit("method:MKCOL", [ Sabre\HTTP ... }])
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 253:
Sabre\DAV\Server->invokeMethod(Sabre\HTTP\Request {}, Sabre\HTTP\Response {})
/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php - line 321:
Sabre\DAV\Server->start()
/var/www/html/apps/dav/lib/Server.php - line 339:
Sabre\DAV\Server->exec()
/var/www/html/apps/dav/appinfo/v2/remote.php - line 35:
OCA\DAV\Server->exec()
/var/www/html/remote.php - line 166:
require_once("/var/www/html/lib/private/Log/ErrorHandler.php"