Skip to content

SAF: handle read-only-flag for files #15517

@Thamos0815

Description

@Thamos0815

⚠️ Before posting ⚠️

  • This is a bug, not a question or an enhancement.
  • I've searched for similar issues and didn't find a duplicate.
  • I've written a clear and descriptive title for this issue, not just "Bug" or "Crash".
  • I agree to follow Nextcloud's Code of Conduct.

Steps to reproduce

  1. Prepare a read-only file: Another user shares a file with the permissions restricted to read-only
  2. In a 3rd-Party app: open the file from nextcloud using the system picker. I used KeepassDX
  3. In 3rd-Party app: save a modified file.

Expected behaviour

  1. The 3rd-Party app notices that it is opening the file as read-only and may propagate this to the user.
  2. At latest, when trying to save the file, some error message should pop up.

Actual behaviour

  1. The 3rd-Party app does not notice the permission-restriction. The file is opened for edit.
  2. The 3rd-Party app can save a modified file.
  3. Nextcloud App trys to synchronize the file. This results in transmission error "Berechtigungsfehler" (permission error?). The transmission is retried again and again, resulting in a sync-loop.
  4. When the file is loaded again in the 3rd-Party app, the modified version is loaded.
  5. The only way to recover i found was to delete the file in "Auf dem Gerät" (On the device?) locally. This way i lost the made changes. It took me quiet some time to discover, that i have to delete it there.

Android version

11

Device brand and model

Nokia 6.2

Stock or custom OS?

Stock

Nextcloud android app version

3.32.3

Nextcloud server version

30.0.12

Using a reverse proxy?

No

Android logs

No response

Server error logs

Additional information

i have no logging facilities set up. If you really need a log of this, i can try to set this up later.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions