Why it fails to specify the permission for backup files with option --chmod when using rsync command?
Issue
When trying to backup files with rsync command as follow:
# rsync -v -rltD --chmod=u+rwx,g+rwx,o+rx /var/log/ /tmp/log
The permission of backup files failed to specify to 775 but became to 755.
# ll /tmp/log/
total 13876
-rwxr-xr-x 1 root root 0 Oct 31 16:35 aaa
-rwxr-xr-x 1 root root 4627 Apr 21 2014 anaconda.ifcfg.log
-rwxr-xr-x 1 root root 32542 Apr 21 2014 anaconda.log
-rwxr-xr-x 1 root root 53057 Apr 21 2014 anaconda.program.log
-rwxr-xr-x 1 root root 152244 Apr 21 2014 anaconda.storage.log
Environment
- Red Hat Enterprise Linux 6
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.