rsync error: chmod not permitted

General support questions
Post Reply
rtcary
Posts: 140
Joined: 2005/10/13 18:40:55
Contact:

rsync error: chmod not permitted

Post by rtcary » 2020/01/16 22:32:14

I am trying to use rsync to copy files from the server to a usb drive. The process is being run under sudo, and the destination is formatted as exfat.

rsync -av --delete /var/www/html/ /usb/html/

The lines of error are

rsync: chmod"..." not permitted

What switches do I need to change?

Todd

stevemowbray
Posts: 519
Joined: 2012/06/26 14:20:47

Re: rsync error: chmod not permitted

Post by stevemowbray » 2020/01/17 11:56:03

I don't have an EXFAT drives to test with, but obviously it does not understand unix-style permissions and ownership. You can either reformat the drive as extN or xfs, or look up in the rsync man page what flags are included in -a and leave out the ones that don't apply. You might also need to look at the rsync --modify-window option if EXFAT is like FAT as regards timestamps.

pjsr2
Posts: 614
Joined: 2014/03/27 20:11:07

Re: rsync error: chmod not permitted

Post by pjsr2 » 2020/01/17 12:08:33

The exfat file system does not use the same permission and ownership system as on Unix/Linux filesystems. This causes the error messages you see from chmod.

You can add options to your rsync command not to sýnchronize the permissions and ownership. But this has the disadvantage that you loose that information from your backup and you may need that to do a proper restore.

It is not a good idea to use an exfat formatted device as backup medium. Besides the above mentioned ownership/permission problem, exfat does not support case sensitive names, so if you have two or more files in the same directory that have names that only differ in case, one of them will be lost. Also some characters that are allowed in Linux file names are not allowed in exfat ( e.g. ':* and '$').

You could reformat your USB device with a Linux-like filesystem (for example ext4), or make your backups using tar.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: rsync error: chmod not permitted

Post by TrevorH » 2020/01/17 12:48:11

Or you could use something like tar which will happily write a massive file to your exFAT filesystem and inside that will be all the permission and ownership info ready in case you have to untar it.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply