External storage - FTP: mounted folder shows empty

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:


Or for longer, use three backticks above and below the code snippet:


Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.3' Operating system and version _(eg, Ubuntu 20.04)_: Unsure/cPanel installationApache or nginx version _(eg, Apache 2.4.25)_: Unsure/cPanel installationPHP version _(eg, 7.4)_:8.2.11`

The issue you are facing:

Fresh install of NextCloud. I added external storage as FTP. Green checkmark at setup (also checked on the ftp server and the connection is logged as succesful), the folder mounts and shows in the “FIles” section but when I open it it’s empty.

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. Add external storage as FTP or FTPS
  2. Mount appears in Files section
  3. Opening the folder shows that it is empty. I cannot create new files in it. Creating new folders works but they only show up on the server and not in NextCloud.

The output of your Nextcloud log in Admin > Logging:

[PHP] Error: foreach() argument must be of type array|object, bool given at /home2/berbecer/public_html/apps/files_external/lib/Lib/Storage/FTP.php#346

[no app in context] Warning: Unable to get last modified date for ftp folder (), failed to list folder contents

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

$CONFIG = array (
  'instanceid' => 'Removed',
  'passwordsalt' => 'Removed',
  'secret' => 'Removed',
  'trusted_domains' => 
  array (
    0 => 'Removed',
  'datadirectory' => '/home2/berbecer/nextclouddata',
  'dbtype' => 'mysql',
  'version' => '',
  'overwrite.cli.url' => 'Removed',
  'dbname' => 'Removed',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'Removed',
  'dbpassword' => 'Removed',
  'installed' => true,
  'mysql.utf8mb4' => true,
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'radu',
  'mail_domain' => 'Removed',
  'mail_smtphost' => 'Removed',
  'mail_smtpport' => '465',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'Removed',
  'mail_smtppassword' => 'Removed',
  'default_phone_region' => 'RO',
  'memcache.local' => '\OC\Memcache\APCu',
  'memcache.distributed' => '\OC\Memcache\APCu',