SMB-share External storage support not syncing to Client

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, 18.0.2): 19.03
Operating system and version (eg, Ubuntu 20.04):Ubuntu 20.04
Apache or nginx version (eg, Apache 2.4.25): nginx 1.19.2
PHP version (eg, 7.1): 7.4.10

The issue you are facing:
We have a SMB-share for our office files. As some users needed to have access to certain files when they are out of the office, I installed a new server running Nextcloud with the External storage support app to get access to the SMB-share. The access is controlled via LDAP-app.

Unfortunately the client does not recognize any changes directly made on the SMB-share, which most of others users still use.

There is a service running in the background:
/usr/bin/php /var/www/nextcloud/occ files_external:notify -v -u <username> -p <password> <mount-id>, which recognizes all changes.

Having a cronjob with the command
sudo -u www-data php /var/www/nextcloud/occ files:scan --all --unscanned

Also other variants of this command (without --unscanned, with username, …) do not help.

Sometimes the files are synced, as soon as I log on to the web GUI and navigate to the corresponding folder.

Is this the first time you’ve seen this error? (Y/N): Y, but I did not see it working any time.

Steps to replicate it:

  1. Fresh Nextcloud installation
  2. Install & activate External storage support
  3. Sync folder via desktop client (3.0.1 macOS)

The output of your Nextcloud log in Admin > Logging:

{"reqId":"dfNMnNuuM2mKJTnDXbDk","app":"/var/www/nextcloud/occ files:scan --unscanned --all","message":"+++ Cron Filescan Completed. Execution time: 0 minutes and 1 seconds +++","level":1,"time":"2020-09-29T17:09:23+02:00","id":"5f7353db78592"}

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

$CONFIG = array (
  'passwordsalt' => '***',
  'secret' => '+csbgCA/***',
  'trusted_domains' => 
  array (
    0 => 'cloud.***.de',
    1 => '10.0.1.163',
  ),
  'datadirectory' => '/var/nc_data',
  'dbtype' => 'mysql',
  'version' => '19.0.3.1',
  'overwrite.cli.url' => 'https://cloud.***.de',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/var/run/mysqld/mysqld.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '******',
  'installed' => true,
  'instanceid' => 'ocpfzrwxu3fa',
  'activity_expire_days' => 14,
  'auth.bruteforce.protection.enabled' => true,
  'blacklisted_files' => 
  array (
    0 => '.htaccess',
    1 => 'Thumbs.db',
    2 => 'thumbs.db',
  ),
  'cron_log' => true,
  'enable_previews' => true,
  'enabledPreviewProviders' => 
  array (
    0 => 'OC\\Preview\\PNG',
    1 => 'OC\\Preview\\JPEG',
    2 => 'OC\\Preview\\GIF',
    3 => 'OC\\Preview\\BMP',
    4 => 'OC\\Preview\\XBitmap',
    5 => 'OC\\Preview\\Movie',
    6 => 'OC\\Preview\\PDF',
    7 => 'OC\\Preview\\MP3',
    8 => 'OC\\Preview\\TXT',
    9 => 'OC\\Preview\\MarkDown',
  ),
  'filesystem_check_changes' => 0,
  'filelocking.enabled' => 'true',
  'htaccess.RewriteBase' => '/',
  'integrity.check.disabled' => false,
  'knowledgebaseenabled' => false,
  'logfile' => '/var/nc_data/nextcloud.log',
  'loglevel' => 2,
  'logtimezone' => 'Europe/Berlin',
  'log_rotate_size' => 104857600,
  'maintenance' => false,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'overwriteprotocol' => 'https',
  'preview_max_x' => 1024,
  'preview_max_y' => 768,
  'preview_max_scale_factor' => 1,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis-server.sock',
    'port' => 0,
    'timeout' => 0.0,
  ),
  'quota_include_external_storage' => false,
  'share_folder' => '/Shares',
  'skeletondirectory' => '',
  'theme' => '',
  'trashbin_retention_obligation' => 'auto, 7',
  'updater.release.channel' => 'stable',
  'ldapIgnoreNamingRules' => false,
  'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);

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

nothing

Hi,

Did you manage to solve this issue? We are facing exactly the same behavior.

Regards,

Mark