nextcloud / nextcloud/richdocuments

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

Open
#4,924 2 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature: secure view need to reproduce
Dominant language
JavaScript
Stars
453
Forks
147
Avg merge
14h 54m
Merged PRs (30d)
83

Description

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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

The failure is logged at apps/files_external/lib/Lib/Storage/SFTP.php#312; start there and reproduce folder deletion with Secure View and richdocuments enabled, then compare it with richdocuments disabled. Done means deleting a folder from an external SFTP mount through the web interface succeeds without the reported fopen/fclose errors.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
backend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.