Nextcloud version (eg, 20.0.5): 27.1.5
Operating system and version (eg, Ubuntu 20.04): Debian 12 Docker 25.0.2
Apache or nginx version (eg, Apache 2.4.25): 2.4.58
PHP version (eg, 7.4): 8.1.27
The issue you are facing: External SMB storage does not allow downloading, and thus syncing with Nextcloud Desktop Client, when subfolder of share is entered in the remote subfolder field. Files will list in the Nextcloud web interface but throw a Sabre\DAV\Exception\ServiceUnavailable: Could not open file error when attempting to open or download.
This can be resolved by specifying the remote subfolder in the share field with a forward (/) slash, however, this causes the occ external_files:notify command to fail with a [Icewind\SMB\Exception\ConnectionRefusedException] error.
I’m using LDAP for Nextcloud user login, but I specify a domain account that has modify access to the root of the SMB share.
Is this the first time you’ve seen this error? (Y/N): Y
Steps to replicate it:
- Setup LDAP on Nextcloud with home path set to sAMAccountName.
- Setup External Storage SMB that points to Users share with $home for remote subfolder. Specify service account that has modify access to root share and subfolders.
- Connect to nextcloud-aio-nextcloud container as www-data and run occ files:scan --unscanned --all
- Attempt to download file from web interface.
- Second issue follows these same steps except /$home is appended to share instead of being entered in remote subfolder.
The output of your Nextcloud log in Admin > Logging:
{"reqId":"7oOuqqxl6xZppppUrshi","level":3,"time":"2024-02-05T17:43:15+00:00","remoteAddr":"172.26.0.1","user":"FF929935-663E-429E-AD1F-D9577C962D87","app":"webdav","method":"GET","url":"/remote.php/dav/files/FF929935-663E-429E-AD1F-D9577C962D87/U%20Drive/Desktop%20Sync/Desktop/What%20if%20I%20rename%20it.txt","message":"Could not open file","userAgent":"Mozilla/5.0 (Windows) mirall/3.11.1stable-Win64 (build 20240125) (Nextcloud, windows-10.0.19045 ClientArchitecture: x86_64 OsArchitecture: x86_64)","version":"27.1.5.1","exception":{"Exception":"Sabre\\DAV\\Exception\\ServiceUnavailable","Message":"Could not open file","Code":0,"Trace":[{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/CorePlugin.php","line":85,"function":"get","class":"OCA\\DAV\\Connector\\Sabre\\File","type":"->","args":[]},{"file":"/var/www/html/3rdparty/sabre/event/lib/WildcardEmitterTrait.php","line":89,"function":"httpGet","class":"Sabre\\DAV\\CorePlugin","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":472,"function":"emit","class":"Sabre\\DAV\\Server","type":"->","args":["method:GET",[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":253,"function":"invokeMethod","class":"Sabre\\DAV\\Server","type":"->","args":[["Sabre\\HTTP\\Request"],["Sabre\\HTTP\\Response"]]},{"file":"/var/www/html/3rdparty/sabre/dav/lib/DAV/Server.php","line":321,"function":"start","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/lib/Server.php","line":365,"function":"exec","class":"Sabre\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/apps/dav/appinfo/v2/remote.php","line":35,"function":"exec","class":"OCA\\DAV\\Server","type":"->","args":[]},{"file":"/var/www/html/remote.php","line":172,"args":["/var/www/html/apps/dav/appinfo/v2/remote.php"],"function":"require_once"}],"File":"/var/www/html/apps/dav/lib/Connector/Sabre/File.php","Line":498,"message":"Could not open file","exception":[],"CustomMessage":"Could not open file"},"id":"65c124933ba46"}
The output of your config.php file in /path/to/nextcloud
(make sure you remove any identifiable information!):
<?php
$CONFIG = array (
'one-click-instance' => true,
'one-click-instance.user-limit' => 100,
'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,
),
),
'appsallowlist' =>
array (
),
'check_data_directory_permissions' => false,
'memcache.distributed' => '\\OC\\Memcache\\Redis',
'memcache.locking' => '\\OC\\Memcache\\Redis',
'redis' =>
array (
'host' => 'nextcloud-aio-redis',
'password' => *SENSITIVE-REMOVED*',
'port' => 6379,
),
'overwritehost' => *SENSITIVE-REMOVED*,
'overwriteprotocol' => 'https',
'passwordsalt' => *SENSITIVE-REMOVED*,
'secret' => *SENSITIVE-REMOVED*,
'trusted_domains' =>
array (
0 => 'localhost',
1 => *SENSITIVE-REMOVED*,
),
'datadirectory' => '/mnt/ncdata',
'dbtype' => 'pgsql',
'version' => '27.1.5.1',
'overwrite.cli.url' => *SENSITIVE-REMOVED*,
'dbname' => 'nextcloud_database',
'dbhost' => 'nextcloud-aio-database',
'dbport' => '',
'dbtableprefix' => 'oc_',
'dbuser' => 'oc_nextcloud',
'dbpassword' => *SENSITIVE-REMOVED*,
'installed' => true,
'instanceid' => *SENSITIVE-REMOVED*,
'maintenance' => false,
'loglevel' => '2',
'log_type' => 'file',
'logfile' => '/var/www/html/data/nextcloud.log',
'log_rotate_size' => '10485760',
'log.condition' =>
array (
'apps' =>
array (
0 => 'admin_audit',
),
),
'preview_max_x' => '2048',
'preview_max_y' => '2048',
'jpeg_quality' => '60',
'enabledPreviewProviders' =>
array (
1 => 'OC\\Preview\\Image',
2 => 'OC\\Preview\\MarkDown',
3 => 'OC\\Preview\\MP3',
4 => 'OC\\Preview\\TXT',
5 => 'OC\\Preview\\OpenDocument',
6 => 'OC\\Preview\\Movie',
7 => 'OC\\Preview\\Krita',
),
'enable_previews' => true,
'upgrade.disable-web' => true,
'mail_smtpmode' => 'smtp',
'trashbin_retention_obligation' => 'auto, 30',
'versions_retention_obligation' => 'auto, 30',
'activity_expire_days' => '30',
'simpleSignUpLink.shown' => false,
'share_folder' => '/Shared',
'one-click-instance.link' => 'https://nextcloud.com/all-in-one/',
'upgrade.cli-upgrade-link' => 'https://github.com/nextcloud/all-in-one/discussions/2726',
'updatedirectory' => '/nc-updater',
'allow_local_remote_servers' => true,
'davstorage.request_timeout' => 3600,
'htaccess.RewriteBase' => '/',
'dbpersistent' => false,
'files_external_allow_create_new_local' => false,
'trusted_proxies' =>
array (
0 => '127.0.0.1',
1 => '::1',
),
'mail_from_address' => *SENSITIVE-REMOVED*,
'mail_sendmailmode' => 'smtp',
'mail_domain' => *SENSITIVE-REMOVED*,
'mail_smtpauth' => 1,
'mail_smtphost' => *SENSITIVE-REMOVED*,
'mail_smtpport' => '587',
'mail_smtpname' => *SENSITIVE-REMOVED*,
'mail_smtppassword' => *SENSITIVE-REMOVED*,
'ldapProviderFactory' => 'OCA\\User_LDAP\\LDAPProviderFactory',
);
The output of your Apache/nginx/system log in /var/log/____
:
Nothing Relevant
Output errors in nextcloud.log in /var/www/ or as admin user in top right menu, filtering for errors. Use a pastebin service if necessary.
Unsure of location on docker install.