Execute permissions on restored/mounted items, on Linux


At present when I mount or restore a Linux shell script, it has lost the execute-permission that it had when it was backed up with rclone. This thread seems to suggest that there is not much I can do about that. If so, then that's a pain because I back-up a lot of scripts with rclone. Might someone advise, please? I'm backing up to BackBlaze B2.

The sort of filesystem the underlying storage system supports dictates what metadata and permissions can be saved. Generally not that much aside from the basics, and I think in terms of permissions it's only related to the cloud-storage and not the system it came from.

You might have success in preserving metadata and permissions if you archive files before they go to the cloud. I haven't looked deeply into this, but as long as the archiving software itself supports it I don't see how it could lose that data i in the cloud as it would be part of the core file itself.

From the Linux side, there isn't much you can do if you can backup directly to a cloud storage provider as they have no concept of Linux file permissions.

You can use your mount and use the flags listed in the post you linked if you mounted it. I wasn't sure if you were trying to restore it back or not.

If backup is your goal, you could check out something like restic to sit in between or you could tar up and backup that way. Basically, you need to do something prior to moving to the cloud so you can restore and get your permissions back.

If you still want to back up to the cloud directly, you can use this little tip that @calisro shared for a few folks:

Just a side-bar in the meantime. you can do this then back that file up.

getfacl -R / >permissions.facl

setfacl --restore=permissions.facl 

Thanks, both.

Perhaps the best solution for me - to minimize the hassle - is to manage my scripts in the first instance with git - though I've never run my own repository. If I can have a private repo, then hopefully I can sync my scripts to it and sync my scripts from it. The main thing I want to do - aside from having an in-case-of-more-or-less-disaster cloud backup - is to keep scripts the same on multiple computers.


there is a compression remote in the works right now. Once complete tthat might provide a convenient and transparent solution for you. I think you can find and track it in the projects section of the rclone github.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.