1

I would like to know how to sync directories with same owner, timestamp, group etc

I tried below but it ask for my password and respective files/directories will be copied with my name. Please suggest on this.

rsync -avz /home/duser/p server2:/home/duser/ 
1

1 Answer 1

1

As with the chown utility, you can not "give away" ownership of files, and neither can you "grab ownership" of files that you don't own, unless you are root.

To be able to preserve ownership and group ownerships on files and directories that you copy with rsync, you will have to do it as the root user.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.