Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. 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

How can I copy a folder structure from one server to another keeping the same owner and file permissions?

share|improve this question
Would you like to comment about why you down voted this question? – Stuart Woodward Apr 5 '12 at 7:16
The question doesn't have any downvotes, so if somebody did downvote it they took it back pretty fast – Michael Mrozek Apr 6 '12 at 1:43
I found some more answers here: superuser.com/questions/81789/… I searched for this question like crazy before posting and I now I have found it again. – Stuart Woodward Apr 6 '12 at 3:09

Using -a option with the rsync command you can transfer the file between server under same ownership and perm.

Synchronise between local and remote server

#rsync -avz /source username@ 

Synchronise between local and remote over ssh.

%rsync -avz -e ssh username@ /destination 
share|improve this answer

rsync with -a will copy ownership and permissions. It will even work over ssh.

share|improve this answer

Your Answer


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.