Support for OS permission awareness in storage
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 36.9k
- Forks
- 5.2k
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 713
Description
⚠️ This issue respects the following points: ⚠️
- This is a bug, not a question or a configuration/webserver/proxy issue.
- This issue is not already reported on Github OR Nextcloud Community Forum (I've searched it).
- Nextcloud Server is up to date. See Maintenance and Release Schedule for supported versions.
- I agree to follow Nextcloud's Code of Conduct.
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
- Configure an External Storage in Nextcloud.
- Create a Word document on the external storage.
- Set the file permissions at the filesystem level so that User A has read-only access.
- Log in to Nextcloud as User A.
- Open the document using Collabora Online (or ONLYOFFICE).
- Switch to Edit Mode.
- Make a small modification to the document.
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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