rsync permissions from Windows (cygwin) to Linux server

1

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.

arnaslu

Posted 2012-11-30T13:32:45.570

Reputation: 111

Answers

0

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.

trjh

Posted 2012-11-30T13:32:45.570

Reputation: 11