I know that there are a lot of treads about this subject, but I was unable to solve it.
I'd like to make a simple backup with
rsync between my hard drive and a USB device. My original directories and files have different permissions (0664, 0644, 0444, 0755, etc.).
I tried various option, the basic one is
rsync -avzu --delete --delete-after --progress /source /target
(and -a implies -p, which «preserve permissions», as says the linux man page). But in the USB device I find all permissions set to 0777, independently of issuing the command as simple user or as root.
The device is mounted in
/media (I'm working on a Debian machine) and its permissions are automatically set to 0777. So, I have the impression that
rsync is limited to giving the device permissions to files and directories, instead of keeping the original ones.
Is there a way to solve with
rsync, or have I to change permissions at a later time with