Nextcloud version : 25.0.13
Operating system and version : Ubuntu 20.04.6 LTS
Apache or nginx version : 2.4.41-4ubuntu3.14
PHP version : 7.4.3
Hi everyone,
I created external SMB/CIFS shares using username/password authentication
The external storage is a windows 2016 serveur.
The connection is running fine , we have access to the files. We also created shares to publish some of these files to external users.
Everything was going greatfor a couple of years and suddenly, all these shares disappeared. Shares from internal storage are fine but all shares pointing to the external storage are now missing. They are also missing in the oc_shares mysql table.
So far, the only way we could manage to recover the shares (hundreds) is to restore a backup of the server.
It goes on for one week or two and the problem comes back.
When I test the external storage with smbclient, the resource is available. Therefore I assume the problem doesn’t come from the Windows Server.
The only thing I could notice from nextcloud.log, is this :
{"reqId":"KiBISwotm5kq29XAl43I","level":3,"time":"2023-11-24T17:30:45+01:00","remoteAddr":"","user":"--","app":"files","method":"","url":"/next/cron.php","message":"Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for /","userAgent":"--","version":"25.0.13.2","exception":{"Exception":"Icewind\\SMB\\Exception\\Exception","Message":"Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for ...
It is like the external storage gets invalidated for some mysterious reasons.
Config.php
<?php
$CONFIG = array (
'force_language' => 'fr',
'force_locale' => 'fr_FR',
'passwordsalt' => '',
'secret' => '',
'trusted_domains' =>
array (
0 => 'localhost',
1 => '192.168.1.2',
2 => 'comptoir.newtonexpertise.com/next',
3 => 'hanoi.dmz.newtonexpertise.com',
),
'trusted_proxies' =>
array (
0 => '192.168.1.1',
1 => 'comptoir.newtonexpertise.com/next',
),
'overwritewebroot' => '/next',
'overwritehost' => 'comptoir.newtonexpertise.com',
'overwriteprotocol' => 'https',
'overwritecondaddr' => '^192\\.168\\.1\\.1$',
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '25.0.13.2',
'overwrite.cli.url' => 'https://192.168.1.2/',
'dbname' => 'nextcloud_db',
'dbhost' => 'localhost',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => '',
'dbpassword' => '',
'installed' => true,
'instanceid' => 'ocbe8edq48vi',
'upgrade.disable-web' => 'true',
'log_type' => 'file',
'logfile' => '/var/log/nextcloud/nextcloud.log',
'loglevel' => 2,
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'mail_smtpmode' => 'smtp',
'remember_login_cookie_lifetime' => '1800',
'log_rotate_size' => '10485760',
'trashbin_retention_obligation' => 'auto, 180',
'versions_retention_obligation' => 'auto, 365',
'simpleSignUpLink.shown' => 'false',
'memcache.local' => '\\OC\\Memcache\\APCu',
'filelocking.enabled' => true,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => '/var/run/redis/redis-server.sock',
'port' => 0,
'timeout' => 0.5,
'dbindex' => 0,
'password' => '',
),
'logtimezone' => 'Europe/Paris',
'htaccess.RewriteBase' => '/',
'maintenance' => false,
'mail_from_address' => 'nextcloud',
'mail_sendmailmode' => 'smtp',
'mail_domain' => '',
'mail_smtpport' => '465',
'mail_smtphost' => '',
'mail_smtpsecure' => 'ssl',
'mail_smtpauth' => 1,
'mail_smtpauthtype' => 'LOGIN',
'mail_smtpname' => '',
'mail_smtppassword' => '',
'enable_previews' => false,
'ldapIgnoreNamingRules' => false,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
'default_phone_region' => 'FR',
);