nextcloud / nextcloud/server

Support for OS permission awareness in storage

Open
#62,946 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

0. Needs triage enhancement feature: external storage
Dominant language
PHP
Stars
36.9k
Forks
5.2k
Avg merge
2d 3h
Merged PRs (30d)
713

Description

⚠️ This issue respects the following points: ⚠️
Bug description

Description

We have identified an inconsistency in the behavior of Collabora Online and ONLYOFFICE when working with files stored on Nextcloud External Storage.

Scenario 1: External Storage (Read-only at filesystem level)
A file is stored on an External Storage backend.
The file has read-only permissions at the filesystem level.
The user can open the file and switch to Edit Mode in Collabora Online or ONLYOFFICE.
The user can make modifications to the document.
However, when attempting to save the changes, an error is displayed indicating that the document cannot be saved.
Scenario 2: Nextcloud Share (Read-only permission)
The same type of file is shared with another user using read-only permissions through Nextcloud.
The recipient can open the document.
The recipient cannot switch to Edit Mode.
The document is correctly displayed as view-only.

This behavior appears to be the expected one.

Steps to reproduce
  1. Configure an External Storage in Nextcloud.
  2. Create a Word document on the external storage.
  3. Set the file permissions at the filesystem level so that User A has read-only access.
  4. Log in to Nextcloud as User A.
  5. Open the document using Collabora Online (or ONLYOFFICE).
  6. Switch to Edit Mode.
  7. Make a small modification to the document.
  8. Click Save.
Expected behavior

When a file is read-only because of filesystem permissions on External Storage, the user should not be able to switch to Edit Mode. The document should be opened in view-only mode, just as when a file is shared with read-only permissions through Nextcloud.

Nextcloud Server version

35 (master)

Operating system

Other

PHP engine version

No response

Web server

None

Database engine version

PostgreSQL

Is this bug present after an update or on a fresh install?

Fresh Nextcloud Server install

Are you using the Nextcloud Server Encryption module?

None

What user-backends are you using?
  • Default user-backend (database)
  • LDAP/ Active Directory
  • SSO - SAML
  • Other
Configuration report

List of activated Apps

Nextcloud Signing status

Nextcloud Logs

Additional info

No response

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

Begin with the external-storage permission check used when opening a file for Collabora Online or ONLYOFFICE, then compare it with the Nextcloud read-only share path. Reproduce the filesystem-read-only scenario and trace the edit-mode decision. Done means both integrations open such files in view-only mode instead of allowing edits that fail on save.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
authorization, backend, cloud
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.