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?
rsync
stores them as files on the other side though.$ 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