I'm trying to sync files from development machine running Windows (using cygwin) to staging server running Linux.

I tried rsync -avz --no-p --no-g so synced directories/files would receive default permissions, but in my case both directories and files receive 755 permission. It's fine for direcotries, but for files I would like to get 644.

I tried playing with --chmod but couldn't find the right combination.


I was having the same problem and your question pointed me towards the --chmod option. The recommended settings seem to work for me. I'm using cygwin on a Windows 7 system syncing to a FreeBSD system.

% rsync -rltvu --chmod=ugo=rwX Applications unixhost:/windows/backup

Using that, the destination host received the files with directory mode 755 and file mode 644.

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.