Copying files from a readonly filesystem resets all permissions
Affected version
Nightly flatpak: Yes
Use cases
When copying files from a readonly filesystem the permissions are reset to the default permissions. See nautilus-file-operations.c#L5533.
When mounting an archive in Pika Backup we expose the backup data as a readonly fuse mount. Restoring the files back to their original position will have their permissions be changed unexpectedly.
Available features and workarounds
Workaround 1: Copy data via the commandline. This is of course not a good option for usability reasons. Also users will possibly not immediately notice the permissions reset until after the copy process has already taken place.
Workaround 2: Restore the permissions retroactively. For big folders this is quite the undertaking.
Difficulties and insufficiencies
The current behavior is inconvenient and potentially confusing when restoring files from a readonly backup. This expecially loses the executable permission from files which makes such a restore incomplete in an unexpected way.
Suggested enhancements
Keep the permissions change to a minimum, eg. only add write permissions in case they are lacking because the file is being copied from an ODD.