Re: Rsync to transfer files owned by different users
RolandK via rsync <[email protected]> Mon, 13 Apr 2026 15:44:27 +0200
| Newsgroups | gmane.network.rsync.general |
|---|---|
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--===============2375709302172087796==
Content-Type: multipart/alternative;
boundary="------------M0WbnUv3abNbg5u0yEWOlAil"
This is a multi-part message in MIME format.
--------------M0WbnUv3abNbg5u0yEWOlAil
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
you can use rsync via sudo
https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the-destination-machine
Am 13.04.26 um 13:44 schrieb H via rsync:
> Running rsync 3.2.5 on Rocky Linux 9. I am a long-time vanilla user of rsync to transfer files between servers and local computers. Now, however, I have a need that is more complex and I could use some help figuring out how to do.
>
> I need to transfer directories/files owned by multiple users from a server to another machine in preparation for a switch-over. I am the administrator of both machines and I have configured them to only allow access using ssh using my key, in other words, no password logins, nor can root access the machines using ssh.
>
> I am hoping I - using a bash script - can log in, elevate my privileges to root and then (somehow) transfer the files from the server to another machine.
>
> I should add that this server is running rsync 3.1.2 on CentOS 7.
>
> Can I do this given the constraints I have above? If so, what should the command look like?
>
> Many thanks in advance!
>
>
>
--------------M0WbnUv3abNbg5u0yEWOlAil
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: 7bit
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p>you can use rsync via sudo<br>
<br>
<a class="moz-txt-link-freetext" href="https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the-destination-machine">https://askubuntu.com/questions/719439/using-rsync-with-sudo-on-the-destination-machine</a><br>
<br>
<br>
<br>
</p>
<div class="moz-cite-prefix">Am 13.04.26 um 13:44 schrieb H via
rsync:<br>
</div>
<blockquote type="cite"
cite="mid:[email protected]">
<pre wrap="" class="moz-quote-pre">Running rsync 3.2.5 on Rocky Linux 9. I am a long-time vanilla user of rsync to transfer files between servers and local computers. Now, however, I have a need that is more complex and I could use some help figuring out how to do.
I need to transfer directories/files owned by multiple users from a server to another machine in preparation for a switch-over. I am the administrator of both machines and I have configured them to only allow access using ssh using my key, in other words, no password logins, nor can root access the machines using ssh.
I am hoping I - using a bash script - can log in, elevate my privileges to root and then (somehow) transfer the files from the server to another machine.
I should add that this server is running rsync 3.1.2 on CentOS 7.
Can I do this given the constraints I have above? If so, what should the command look like?
Many thanks in advance!
</pre>
</blockquote>
</body>
</html>
--------------M0WbnUv3abNbg5u0yEWOlAil--
--===============2375709302172087796==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
--
Please use reply-all for most replies to avoid omitting the mailing list.
To unsubscribe or change options: https://lists.samba.org/mailman/listinfo/rsync
Before posting, read: http://www.catb.org/~esr/faqs/smart-questions.html
--===============2375709302172087796==--