richdocuments icon indicating copy to clipboard operation
richdocuments copied to clipboard

Cannot delete folders on external storage when Secure View is enabled in Nextcloud Office

Open konradbr opened this issue 5 months ago • 2 comments

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:

  1. Mount an SFTP folder as external storage
  2. Enable Nextcloud Office
  3. Enable Secure View in Administration settings ... Administration ... Office
  4. Navigate to a folder inside the mounted storage
  5. Attempt to delete a folder via the web interface — Does not work.
  6. Disable the richdocuments app
  7. 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

Image

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

konradbr avatar Aug 02 '25 10:08 konradbr

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.
Image

konradbr avatar Aug 02 '25 11:08 konradbr

Additional note: this does not seem to affect internal/local storage.

konradbr avatar Aug 02 '25 18:08 konradbr