On August 19, 2014 4:27:11 PM CEST, Markus Rosjat <ros...@ghweb.de> wrote:
>Hello,
>
>this has been asked befor though but since searching the net always 
>tells me it should work  but not when I try to do it  .. I'll ask
>again.
>
>what I want to do is:
>  - copy keep ownership and permission when I rsync a file or directory
>
>what I get is:
> - I have a user on both machines who is in wheel (this should make it 
>possible to do this)
> - when I $sudo rsync -a /some/random/file me@remotemachine:/tmp I get 
>the file synced
>     - file has owner someone:someone and 0600
>  - when I check the permission and owner on the remote machine
>     - file has owner me:wheel and 0644
>
>what I can do but dont want to:
>  - I can enable root ssh access
>  - I rsync as root and the owner and permission gets copied even the 
>user doesnt exist on the remote machine
>
>Is there any other thing I miss with the sudo  approach?

Do you by any chance have a forced_command set up in .ssh/authorized_keys?

/Alexander

Reply via email to