I have an rsync command to backup a directory from a remote server to a local NAS on my LAN, mounted on my server. I am using con to invoke the command

rsync --rsh='ssh -pxxx' -rultxz xxx.xxx.xxx.xxx:/path/to/directory/ /media/mountpoint/directory/

The problem is that the directories are not recieving propper perms, and that is screwing with the transfer. This is what happens: The mountpoint has permission 777

The first created folder gets 744

RSync fails as it can't add more files and directories with

mkdir: Permission denied (13)

The folders are being created locally with a userid that doesn't exist on the system (1028) and a group that doesn't exist either. I am guessing these are from the remote location.

The question is: How do I control the created folder/file permissions on the receiving side so I can map them to a local user, and set permissions?

I tried using the -p flag, and


but that made no difference whatsoever.


The problem turned out to be the mount itself. The user who invoked RSync through cron was not the owner of the mountpoint, and therefore, could not change the permissions/owner of the directories. That created the situation where the user created folders that it could not read.

The solution was to add --super to the command and include the user in the sudo group(And restart)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.