<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Sudo with rsync in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010614#M490879</link>
    <description>&lt;PRE&gt;rsync -zavruo rsynccheck --rsync-path='sudo rsync' /some/destination/path&lt;/PRE&gt;&lt;P&gt;It is not clear what you are doing. Is the rsyncchecek parameter a file or directory? This command will fail if you are not cd'd into a path where just the unqualified path is given.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the remote system, it should be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;userName@remoteHost:/some/destination/path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is not clear at all what you are expecting. The userName at the destnation will *only* match the source when the passwd file uses the same UID (user ID number). And similarly, the GID (group ID number) must match. The GID numbers are found in /etc/group. If either /etc/passwd or /etc/group do not match, then you'll have to run as super user as mentioned in the man page.&lt;/P&gt;&lt;P&gt;It would really help if you pasted the &lt;STRONG&gt;ll&lt;/STRONG&gt; command for the source and destination files.&amp;nbsp;&lt;BR /&gt;Don't use: &lt;STRONG&gt;ll rsynccheck&lt;/STRONG&gt;&lt;BR /&gt;Show the fullpath like this: &lt;STRONG&gt;ll -d $PWD/rsynccheck&lt;BR /&gt;&lt;/STRONG&gt;on both machines..&lt;/P&gt;</description>
    <pubDate>Thu, 05 Jul 2018 01:37:06 GMT</pubDate>
    <dc:creator>Bill Hassell</dc:creator>
    <dc:date>2018-07-05T01:37:06Z</dc:date>
    <item>
      <title>Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010369#M490876</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am using rsync with sudo on HPUX.&lt;/P&gt;&lt;P&gt;Rsync version:&lt;BR /&gt;rsync version 3.0.9 protocol version 30&lt;/P&gt;&lt;P&gt;HPUX Version:&lt;/P&gt;&lt;P&gt;#uname -a&lt;BR /&gt;HP-UX SrvName B.11.31 U ia64 0697013711 unlimited-user license&lt;/P&gt;&lt;P&gt;I have created one user "rsynccheck" with sudo rights and he is executing below command.&lt;/P&gt;&lt;P&gt;rsync command:&lt;/P&gt;&lt;P&gt;$rsync -zavru --rsync-path="sudo rsync" /Rsync/file_path /some/path&lt;/P&gt;&lt;P&gt;The command is working fine.My motive for executing above command was that it will preserve users and group of file at destination as it was in source.&lt;/P&gt;&lt;P&gt;The problem is that it is keeping the group at destination as source but changing owner of file to "rsynccheck".&lt;/P&gt;&lt;P&gt;I want to keep same owner and group at source and destination.Please help&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jul 2018 14:05:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010369#M490876</guid>
      <dc:creator>AnkushKalra</dc:creator>
      <dc:date>2018-07-02T14:05:29Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010514#M490877</link>
      <description>&lt;P&gt;From the man page for rsync:&lt;/P&gt;&lt;PRE&gt;      -o, --owner
           This option causes rsync to set the owner of the destination file
           to be the same as the source file, but only if the receiving
           rsync is being run as the super-user (see also the --super and
           --fake-super options).  Without this option, the owner of new
           and/or transferred files are set to the invoking user on the
           receiving side.

           The preservation of ownership will associate matching names by
           default, but may fall back to using the ID number in some
           circumstances (see also the --numeric-ids option for a full
           discussion).&lt;/PRE&gt;&lt;P&gt;There is no easy way to&amp;nbsp;make the source and destination systems use the same owner. Ownership is a number in the passwd file and unless the &lt;STRONG&gt;passwd&lt;/STRONG&gt; files on both machines have been intelligently synchronized, the owner that you see at the destination may not be the same.&lt;/P&gt;&lt;P&gt;To check this, run this command on both source and destination systems:&lt;/P&gt;&lt;PRE&gt;grep ^rsynccheck /etc/passwd&lt;/PRE&gt;&lt;P&gt;The 3rd field (after the second : character) is the number that represents the owner. HP-UX translates this number with commands like&lt;STRONG&gt; ls -l&lt;/STRONG&gt; into usernames from the &lt;STRONG&gt;passwd&lt;/STRONG&gt; file. To see how HP-UX sees ownership, use the command: &lt;STRONG&gt;ls -ln&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Jul 2018 17:02:44 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010514#M490877</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2018-07-03T17:02:44Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010598#M490878</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Thanks for the reply.&lt;/P&gt;&lt;P&gt;I am first testing this on my local server,then i will test this between Two Servers(both HPUX).So the destination path also exists on same server.&lt;/P&gt;&lt;P&gt;I have run below command from "rsynccheck" user&lt;/P&gt;&lt;P&gt;rsync -zavruo rsynccheck --rsync-path='sudo rsync' /some/destination/path&lt;/P&gt;&lt;P&gt;but after executing above command also&amp;nbsp; only i can see group of source folder same as destination folder..User on destination is stiill "rsynccheck"(User which is executing the command) and is different from source.Please suggest.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 04 Jul 2018 12:56:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010598#M490878</guid>
      <dc:creator>AnkushKalra</dc:creator>
      <dc:date>2018-07-04T12:56:35Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010614#M490879</link>
      <description>&lt;PRE&gt;rsync -zavruo rsynccheck --rsync-path='sudo rsync' /some/destination/path&lt;/PRE&gt;&lt;P&gt;It is not clear what you are doing. Is the rsyncchecek parameter a file or directory? This command will fail if you are not cd'd into a path where just the unqualified path is given.&amp;nbsp;&lt;/P&gt;&lt;P&gt;For the remote system, it should be:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;userName@remoteHost:/some/destination/path&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;It is not clear at all what you are expecting. The userName at the destnation will *only* match the source when the passwd file uses the same UID (user ID number). And similarly, the GID (group ID number) must match. The GID numbers are found in /etc/group. If either /etc/passwd or /etc/group do not match, then you'll have to run as super user as mentioned in the man page.&lt;/P&gt;&lt;P&gt;It would really help if you pasted the &lt;STRONG&gt;ll&lt;/STRONG&gt; command for the source and destination files.&amp;nbsp;&lt;BR /&gt;Don't use: &lt;STRONG&gt;ll rsynccheck&lt;/STRONG&gt;&lt;BR /&gt;Show the fullpath like this: &lt;STRONG&gt;ll -d $PWD/rsynccheck&lt;BR /&gt;&lt;/STRONG&gt;on both machines..&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 01:37:06 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010614#M490879</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2018-07-05T01:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010652#M490880</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;.Both source("rsynccheck" folder)and destination path(/some/destination/path)&lt;/P&gt;&lt;P&gt;existes on same server."&lt;SPAN&gt;rsyncchecek" is a file which i am trying to copy using rsync.Also i am executing above command using "rsyncchecek" user.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Hope this clears your confusion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:31:14 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010652#M490880</guid>
      <dc:creator>AnkushKalra</dc:creator>
      <dc:date>2018-07-05T08:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010654#M490881</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;There is a typo error in my above Post.User is "rsynccheck" and also folder name is also "rsynccheck"&lt;/P&gt;&lt;P&gt;I am executing this command to copy one file from source to destination on same server.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for the support provided till now!!!&lt;/P&gt;</description>
      <pubDate>Thu, 05 Jul 2018 08:36:17 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010654#M490881</guid>
      <dc:creator>AnkushKalra</dc:creator>
      <dc:date>2018-07-05T08:36:17Z</dc:date>
    </item>
    <item>
      <title>Re: Sudo with rsync</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010853#M490888</link>
      <description>&lt;P&gt;&lt;SPAN&gt;It would really help if you copy/paste the&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ll&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;command results for the source and destination files.&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't use:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ll rsynccheck&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Show the fullpath like this:&amp;nbsp;&lt;/SPAN&gt;&lt;STRONG&gt;ll -d $PWD/rsynccheck&lt;BR /&gt;&lt;/STRONG&gt;&lt;SPAN&gt;at both locations..&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 07 Jul 2018 01:56:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/sudo-with-rsync/m-p/7010853#M490888</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2018-07-07T01:56:49Z</dc:date>
    </item>
  </channel>
</rss>

