Cannot delete folders on external storage when Secure View is enabled in Nextcloud Office
Describe the bug Trying to delete a folder on an external storage (SFTP) results in '"Delete folder" action failed' error message in the UI... respectively in a "500 Server error" response when deleted locally (and Sync Client attempts to propagate the deletion to the server).
Deletion works correctly via the command line using occ.
Notes Renaming and moving folders as well as deleting files still works perfectly fine.
To Reproduce Steps to reproduce the behavior:
- Mount an SFTP folder as external storage
- Enable Nextcloud Office
- Enable Secure View in Administration settings ... Administration ... Office
- Navigate to a folder inside the mounted storage
- Attempt to delete a folder via the web interface — Does not work.
- Disable the richdocuments app
- Attempt to delete a folder via the web interface — Works.
Expected behavior Folders in external SFTP storage should be deletable from the web interface regardless of whether richdocuments is enabled.
Screenshots
Client details:
- OS: macOS 15.5
- Browser: Firefox (latest)
- Nextcloud Desktop Client: 3.16.6 (macOS)
Server details
Operating system: Ubuntu 24.04
Web server: Apache/2.4.58 (Ubuntu)
Database: mysql Ver 8.0.42-0ubuntu0.24.04.2 for Linux on x86_64 ((Ubuntu))
PHP version: PHP 8.4.10 (cli) (built: Jul 3 2025 12:42:27) (NTS)
Nextcloud version: 31.0.6
Version of the richdocuments app: 8.7.3
Version of Collabora Online: Collabora Online Development Edition 25.04.2.2
Configuration of the richdocuments app:
{
"apps": {
"richdocuments": {
"disable_certificate_verification": "",
"enabled": "yes",
"external_apps": "",
"installed_version": "8.7.3",
"public_wopi_url": "https:\/\/#####",
"types": "filesystem,prevent_group_restriction",
"wopi_allowlist": "127.0.0.1",
"wopi_url": "https:\/\/#####\/apps\/richdocumentscode\/proxy.php?req="
}
}
}
Logs
Nextcloud log (data/nextcloud.log)
webdav
TypeError fclose(): Argument #1 ($stream) must be of type resource, false given
PHP
fopen(sftpread://company//~` miscellaneous/Test 01): Failed to open stream: "OCA\Files_External\Lib\Storage\SFTPReadStream::stream_open" call failed at /var/www/nextcloud/apps/files_external/lib/Lib/Storage/SFTP.php#312
Browser log
N/A
Follow-up:
Bug further traced to Secure View:
- Disabling Secure View resolves the issue.
- Re-enabling (even with all boxes unchecked) causes the issue to re-appear.
Additional note: this does not seem to affect internal/local storage.