Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question

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.

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .