Tell me more ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to transfer lots of files/folders from Windows to Linux using Rsync. On linux server(destination), I want the file permission set to 644, and folder permission set to 755. If possible, I want the ownership set to root.root for all the files/folders. I have tried -p option, but it doesn't work. Thank you for any help.

share|improve this question
Try umask 022 before your copy. – BillThor Feb 10 '11 at 6:21

1 Answer

up vote 3 down vote accepted

You can set the perms using the --chmod parameter e.g.

--chmod=Du=rwx,go=rx,Fu=rw,og=r 

will force the permissions to be set to 755 for Directories and 644 for Files.

share|improve this answer
Thanks. The folder seems change to 744(drwxr--r--). Anyway, I decide to change the permission after transfer. – garconcn Feb 11 '11 at 21:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.