The Basics
- Nextcloud Server version (e.g., 29.x.x):
- 30.0.6
- Operating system and version (e.g., Ubuntu 24.04):
- Ubuntu 22.04.5 LTS
- Web server and version (e.g, Apache 2.4.25):
- Apache/2.4.52
- Reverse proxy and version _(e.g. nginx 1.27.2)
- nothing
- PHP version (e.g, 8.3):
- PHP 8.3.17
- Is this the first time you’ve seen this error? (Yes / No):
- no
-
When did this problem seem to first start?
- Installation method (e.g. AlO, NCP, Bare Metal/Archive, etc.)
- deployed nextcloud-30.0.6.tar.bz2 on an on-premise server.
- Are you using CloudfIare, mod_security, or similar? (Yes / No)
- no
Summary of the issue you are facing:
files_external can’t access Windows Storage Space disks.
about Storage Space :
Steps to replicate it (hint: details matter!):
- Build an applicable Windows Server. (I reproduced it on Windows Server 2022 Standard or 2019 evaluation.)
- Mount three or more test disks. If you want to do this with virtual disks, execute the following in diskpart.
create vdisk file=c:\disk00.vhdx maximum=16384 type=fixed
attach vdisk
create vdisk file=c:\disk01.vhdx maximum=16384 type=fixed
attach vdisk
create vdisk file=c:\disk02.vhdx maximum=16384 type=fixed
attach vdisk
create vdisk file=c:\disk03.vhdx maximum=16384 type=fixed
attach vdisk
exit
- Create a pool of Storage Space. Execute the following command in PowerShell.
New-StoragePool -FriendlyName smbsharepool01 -PhysicalDisks (Get-PhysicalDisk |? {$_.CanPool}) -StorageSubSystemFriendlyName (Get-StorageSubSystem |? {$_.FriendlyName.StartsWith('Windows Storage') | Select-Object -First 1} |% {$_.FriendlyName})
- Create a virtual disk of Storage Space. Execute the folloing command in PowerShell. (Set the number of disks that mounted step 2 to
NumberOfColumns
.)
New-VirtualDisk -StoragePoolFriendlyName smbsharepool01 -FriendlyName smbsharevdisk01 -UseMaximumSize -NumberOfColumns 4 -ResiliencySettingName Parity -ProvisioningType Fixed
- Format and partition the virtual disk in PowerShell. (Set
NewDriveLetter
to your environment.)
$partition = Get-Disk -FriendlyName smbsharevdisk01 | Initialize-Disk -PassThru | New-Partition -UseMaximumSize
$partition | Format-Volume -FileSystem NTFS -Full:$false
$partition | Set-Partition -NewDriveLetter E
- Create applicable directories and set access rights to share it.
(in PowerShell)
mkdir E:\smb01
icacls E:\smb01 /inheritance:r /grant 'Administrators:(CI)(OI)(F)' 'Authenticated Users:(CI)(OI)(M)' 'Everyone:(CI)(OI)(M)'
- Create a smb share.
(in PowerShell)
New-SmbShare -FullAccess Administrators,'Authenticated Users',Everyone -Path E:\smb01 -Name smb01
- on nextcloud server, create an external storage. (set Windows Server address or host name that built step 1 to
host=
.)
occ files_external:create --config host=192.168.64.40 --config share=smb01 --config root="" --config domain="" --config show_hidden=false --config case_sensitive=false --config check_acl=false --config user=Administrator --config password="***setpassword***" smb01 smb password::password
- Verify configuration.
(set your mounted id tomount_id
)
occ files_external:verify 1
expected:
The result of files_external:verify is following:
- status: ok
- code: 0
- message
reproduced:
The result of files_external:verify is following:
- status: error
- code: 1
- message
remarks01:
accessing smbclient was succeeded.
$ smbclient -U Administrator //192.168.64.40/smb01
Password for [WORKGROUP\Administrator]:
Try "help" to get a list of possible commands.
smb: \> ls
. D 0 Sat Feb 22 12:33:48 2025
.. D 0 Sat Feb 22 12:33:48 2025
hereissmb01directory.txt A 56 Sat Feb 22 12:33:48 2025
11005695 blocks of size 4096. 10982565 blocks available
smb: \>
remarks02:
Except for the Storage Space virtual disk, same server shares as expected.
- create smb share on C: drive in PowerShell.
mkdir C:\smb00
get-date | out-file C:\smb00\hereissmb00directory.txt # create a test file.
icacls C:\smb00 /inheritance:r /grant 'Administrators:(CI)(OI)(F)' 'Authenticated Users:(CI)(OI)(M)' 'Everyone:(CI)(OI)(M)'
New-SmbShare -FullAccess Administrators -ChangeAccess 'Authenticated Users','Everyone' -Path C:\smb00 -Name smb00
- on nextcloud server, create an external storage.
occ files_external:create --config host=192.168.64.40 --config share=smb00 --config root="" --config domain="" --config show_hidden=false --config case_sensitive=false --config check_acl=false --config user=Administrator --config password="***setpassword***" smb00 smb password::password
- Verify configuration.
(set your mounted id tomount_id
)
occ files_external:verify 2
Then the result was expected.
- status: ok
- code: 0
- message
Log entries
Any of the following warnings will be issued:
[no app in context] Warning: Error while getting quota info, using root quota
PROPFIND /remote.php/dav/files/USERNAME/
from XXX.XXX.XXX.XXX by USERNAME at 2025/02/22 0:21:48
[no app in context] Warning: External storage not available: Unknown error (NT_STATUS_OBJECT_NAME_INVALID) for /
GET /apps/files_external/globalstorages/15?testOnly=true
from XXX.XXX.XXX.XXX by USERNAME at 2025/02/22 20:44:06
[no app in context] Warning: External storage not available: Storage unauthorized. Unknown error
GET /apps/files_external/globalstorages/12?testOnly=true
from XXX.XXX.XXX.XXX by USERNAME at 2025/02/22 20:37:48
[no app in context] Error: Error while getting file info
GET /apps/files_external/globalstorages/12?testOnly=true
from XXX.XXX.XXX.XXX by USERNAME at 2025/02/22 20:37:43
Nextcloud
Please provide the log entries from your Nextcloud log that are generated during the time of problem (via the Copy raw option from Administration settings->Logging screen or from your nextcloud.log
located in your data directory). Feel free to use a pastebin/gist service if necessary.
Web Browser
If the problem is related to the Web interface, open your browser inspector Console and Network tabs while refreshing (reloading) and reproducing the problem. Provide any relevant output/errors here that appear.
PASTE
Web server / Reverse Proxy
The output of your Apache/nginx/system log in /var/log/____
:
PASTE HERE
Configuration
Nextcloud
The output of occ config:list system
or similar is best, but, if not possible, the contents of your config.php
file from /path/to/nextcloud
is fine (make sure to remove any identifiable information!):
$ sudo -u www-data php /var/www/html/nextcloud/occ config:list system
[sudo] password for superoperator:
{
"system": {
"instanceid": "***REMOVED SENSITIVE VALUE***",
"passwordsalt": "***REMOVED SENSITIVE VALUE***",
"secret": "***REMOVED SENSITIVE VALUE***",
"trusted_domains": [
"192.168.64.32"
],
"datadirectory": "***REMOVED SENSITIVE VALUE***",
"dbtype": "mysql",
"version": "30.0.6.2",
"overwrite.cli.url": "http:\/\/192.168.64.32",
"dbname": "***REMOVED SENSITIVE VALUE***",
"dbhost": "***REMOVED SENSITIVE VALUE***",
"dbport": "",
"dbtableprefix": "oc_",
"mysql.utf8mb4": true,
"dbuser": "***REMOVED SENSITIVE VALUE***",
"dbpassword": "***REMOVED SENSITIVE VALUE***",
"installed": true,
"default_phone_region": "JP",
"default_language": "ja",
"default_locale": "ja",
"memcache.distributed": "\\OC\\Memcache\\Redis",
"memcache.locking": "\\OC\\Memcache\\Redis",
"redis": {
"host": "localhost",
"port": 6379
},
"htaccess.RewriteBase": "\/",
"loglevel": 2
}
}
$
Apps
The output of occ app:list
(if possible).
$ sudo -u www-data php /var/www/html/nextcloud/occ app:list
Enabled:
- activity: 3.0.0
- app_api: 4.0.6
- bruteforcesettings: 3.0.0
- calendar: 5.1.0
- circles: 30.0.0
- cloud_federation_api: 1.13.0
- comments: 1.20.1
- contacts: 7.0.0
- contactsinteraction: 1.11.0
- dashboard: 7.10.0
- dav: 1.31.1
- federatedfilesharing: 1.20.0
- federation: 1.20.0
- files: 2.2.0
- files_downloadlimit: 3.0.0
- files_external: 1.22.0
- files_pdfviewer: 3.0.0
- files_reminders: 1.3.0
- files_sharing: 1.22.0
- files_trashbin: 1.20.1
- files_versions: 1.23.0
- firstrunwizard: 3.0.0
- logreader: 3.0.0
- lookup_server_connector: 1.18.0
- mail: 4.2.0
- nextcloud_announcements: 2.0.0
- notes: 4.11.0
- notifications: 3.0.0
- oauth2: 1.18.1
- password_policy: 2.0.0
- photos: 3.0.2
- privacy: 2.0.0
- provisioning_api: 1.20.0
- recommendations: 3.0.0
- related_resources: 1.5.0
- richdocuments: 8.5.3
- richdocumentscode: 24.4.1204
- serverinfo: 2.0.0
- settings: 1.13.0
- sharebymail: 1.20.0
- spreed: 20.1.4
- support: 2.0.0
- survey_client: 2.0.0
- systemtags: 1.20.0
- text: 4.1.0
- theming: 2.6.0
- twofactor_backupcodes: 1.19.0
- updatenotification: 1.20.0
- user_status: 1.10.0
- viewer: 3.0.0
- weather_status: 1.10.0
- webhook_listeners: 1.1.0-dev
- workflowengine: 2.12.0
Disabled:
- admin_audit: 1.20.0
- encryption: 2.18.0
- files_external_ethswarm: 0.5.10
- suspicious_login: 8.0.0
- twofactor_nextcloud_notification: 4.0.0
- twofactor_totp: 12.0.0-dev
- user_ldap: 1.21.0
$
Tips for increasing the likelihood of a response
- Use the
preformatted text
formatting option in the editor for all log entries and configuration output. - If screenshots are useful, feel free to include them.
- If possible, also include key error output in text form so it can be searched for.
- Try to edit log output only minimally (if at all) so that it can be ran through analyzers / formatters by those trying to help you.