Mounting hidden share as external CIFS storage fails after NextCloud 16 upgrade

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:

example

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

longer
example
here

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, 12.0.2): 16.0.1
Operating system and version (eg, Ubuntu 17.04): CentOS 6.10
Apache or nginx version (eg, Apache 2.4.25): Apache 2.2.15
PHP version (eg, 7.1): 7.1

The issue you are facing:

I’m receiving an External mount error There was an error with message: Mount configuration incomplete. Do you want to review mount point config in personal settings page? for an externally mounted CIFS share which is hidden at the server level ($ character at the end of the sharename). Other mounted CIFS shares without $ character continue to work after the upgrade.

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

Steps to replicate it:

  1. In External storages, Add storage, type SMB / CIFS, enter host & share which includes trailing $
  2. Click the checkbox

The output of your Nextcloud log in Admin > Logging:

{"reqId":"utXG487NX145h35kKbJV","level":3,"time":"2019-06-19T12:00:52-06:00","remoteAddr":"192.168.60.99","user":"nels","app":"files_external","method":"PUT","url":"\/index.php\/apps\/files_external\/userstorages\/3","message":"A placeholder was not substituted: Home$ for mount type \\OCA\\Files_External\\Lib\\Storage\\SMB","userAgent":"Mozilla\/5.0 (X11; Linux x86_64; rv:60.0) Gecko\/20100101 Firefox\/60.0","version":"16.0.1.1"}

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

<?php
$CONFIG = array (
  'passwordsalt' => 'redacted',
  'datadirectory' => 'redacted',
  'dbtype' => 'pgsql',
  'version' => '16.0.1.1',
  'dbname' => 'redacted',
  'dbhost' => '/tmp',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_admin',
  'dbpassword' => 'redacted',
  'installed' => true,
  'instanceid' => 'redacted',
  'ldapIgnoreNamingRules' => false,
  'maintenance' => false,
  'forcessl' => true,
  'share_folder' => '/Shared',
  'maxZipInputSize' => 838860800,
  'allowZipDownload' => true,
  'trusted_domains' => 
  array (
    0 => 'redacted',
  ),
  'overwrite.cli.url' => 'redacted',
  'cron_log' => true,
  'logtimezone' => 'America/City',
  'theme' => '',
  'mail_smtpmode' => 'smtp',
  'mail_from_address' => 'webmaster',
  'mail_domain' => 'maei.ca',
  'secret' => 'redacted',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'has_internet_connection' => true,
  'appstoreenabled' => true,
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => 'redacted',
      'url' => '/apps',
      'writable' => true,
    ),
  ),
  'updatechecker' => true,
  'default_language' => 'en',
  'defaultapp' => 'files',
  'enable_previews' => true,
  'preview_libreoffice_path' => '/usr/bin/libreoffice',
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\BMP',
    3 => 'OC\\Preview\\XBitmap',
    4 => 'OC\\Preview\\MP3',
    5 => 'OC\\Preview\\TXT',
    6 => 'OC\\Preview\\MarkDown',
    7 => 'OC\\Preview\\PDF',
    8 => 'OC\\Preview\\MSOffice2003',
    9 => 'OC\\Preview\\MSOffice2007',
    10 => 'OC\\Preview\\MSOfficeDoc',
    11 => 'OC\\Preview\\OpenDocument',
  ),
  'cache_path' => '',
  'filesystem_check_changes' => 1,
  'asset-pipeline.enabled' => true,
  'mount_file' => 'data/mount.json',
  'redis' => 
  array (
    0 => 'tmp/redis.sock',
    'timeout' => 0,
    'dbindex' => 0,
  ),
  'filelocking.enabled' => true,
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'loglevel' => 2,
  'trashbin_retention_obligation' => 'auto',
  'ldapProviderFactory' => '\\OCA\\User_LDAP\\LDAPProviderFactory',
  'mail_sendmailmode' => 'smtp',
  'mail_smtphost' => 'redacted',
);

The output of your Apache/nginx/system log in /var/log/____:

No errors; request log not relevant.

Check https://github.com/nextcloud/server/pull/15637

Yes, that fixed my issue with hidden shares.

Thanks!