at the end of the backup_file function put in custom meta data posix_permissions and store permissions of the file and parent folder with some delimiter:
user,group,access,folderuser,foldergroup,folderaccess, for example:
55000,10100001,0664,0,10100002,2770
at the end of the backup_file function put in custom meta data posix_permissions and store permissions of the file and parent folder with some delimiter: user,group,access,folderuser,foldergroup,folderaccess, for example: 55000,10100001,0664,0,10100002,2770