0

I'd like to do a backup to a remote machine where I only have a normal user account, so I'm working with --fake-super.

rsync appears to create the files on the server with permissions similar to the local ones, so symlinks end up as regular files with 777 permissions and an extended attribute that says "this should have been a symlink".

Obviously, that is bad on a multiuser system, because as long as they can enter the directory I keep my backup in, they can modify symlink targets.

Is there a way to have rsync create the backup files with a restrictive permission set?

6
  • But they can't enter the directory you keep the backup in, can they? Feb 18, 2019 at 5:45
  • @grawity, no, but from a defense in depth standpoint I'd rather not have everything depend on a single bit if I can avoid it. Feb 18, 2019 at 6:46
  • Do these symlinks have 777 perms on the original system? If so, is that not also a problem?
    – Jim L.
    Feb 22, 2019 at 19:13
  • @JimL., all symlinks show up with 777 permissions normally, but their permissions are normally ignored because you need write permission on the directory to modify them. rsync stores them as files on the other side though. Feb 22, 2019 at 19:35
  • Argh! Can't get newlines where I want them.... $ date > /tmp/bar $ chmod 400 /tmp/bar $ ln -s /tmp/bar . $ ls -l bar lrwx--x--- 1 jim jim 8 Feb 22 11:43 bar@ -> /tmp/bar $ ls -lL bar -r-------- 1 jim jim 29 Feb 22 11:43 bar
    – Jim L.
    Feb 22, 2019 at 19:46

0

You must log in to answer this question.

Browse other questions tagged .