I'm trying to use rsync to copy from an Android source where the sdcard mount has rather nonsensical permissions (---rwxr-x) and rsync fails because it creates the destination directories with the same permissions, then can't create any files in them. I want it to just ignore the permissions from the source and create all files/directories honoring the current umask. --no-perms does not work (and it's the default anyway; I'm not using -a) when new files/directories are being created; it simply prevents changing permissions on files/directories that already exist.



--chmod CHMOD

From the rsync man page:

To give new files the destination-default permissions (while leaving existing files unchanged), make sure that the --perms option is off and use --chmod=ugo=rwX (which ensures that all non-masked bits get enabled).


rsync versione 3.0.4 -- Use the flag -p to enable permission option and define the new changed permission --chmod=g+rw.

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.