<?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: scp and preserving uid in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030770#M670352</link>
    <description>&amp;gt;copy a directory from one server... file ownership to transfer&lt;BR /&gt;&lt;BR /&gt;Of course one way to do this is with NFS if you  don't want to use tar/cpio/pax.</description>
    <pubDate>Mon, 02 Jul 2007 20:19:08 GMT</pubDate>
    <dc:creator>Dennis Handly</dc:creator>
    <dc:date>2007-07-02T20:19:08Z</dc:date>
    <item>
      <title>scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030765#M670347</link>
      <description>I am trying to copy a directory from one server to another using scp but I can't get the file ownership to transfer w/ the files. The -p only preserves the timestamp. Does anyone know of a way to accomplish this?</description>
      <pubDate>Mon, 02 Jul 2007 14:36:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030765#M670347</guid>
      <dc:creator>T-Mobile Tech Support</dc:creator>
      <dc:date>2007-07-02T14:36:37Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030766#M670348</link>
      <description>tar the directory, transfer it, then extract.</description>
      <pubDate>Mon, 02 Jul 2007 14:42:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030766#M670348</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2007-07-02T14:42:29Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030767#M670349</link>
      <description>-p preserves the mode and timestamps but the UID and the GID are determined by the effective UID and GID of the process. You could follow up each scp operation with an ssh'ed chown command but it would be easier to first tar or cpio the files into an archive; scp the archive; and finally ssh a tar or cpio command on the remote host to unarchive the files and remove the archive.</description>
      <pubDate>Mon, 02 Jul 2007 14:43:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030767#M670349</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-07-02T14:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030768#M670350</link>
      <description>Thanks, but I should have been more explicit with my question. Does anyone know of way to copy files preserving the ownership without making an archive of the files and/or directory, i.e. like the cp command with -pr option. And this has to be done across servers enabled w/ ssh. Is there any gnu s/w out there?</description>
      <pubDate>Mon, 02 Jul 2007 15:19:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030768#M670350</guid>
      <dc:creator>T-Mobile Tech Support</dc:creator>
      <dc:date>2007-07-02T15:19:27Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030769#M670351</link>
      <description>First, you would have to make sure that the UID's and GID's are unified across servers or even the archive methods will fail. If you must work in an SSH environent then the most robust/flexible approach that could handle name/group lookups would be a Perl script using Net::SFTP. Rdist or rsync could do what you want but they are not SSH-based.</description>
      <pubDate>Mon, 02 Jul 2007 15:31:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030769#M670351</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2007-07-02T15:31:13Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030770#M670352</link>
      <description>&amp;gt;copy a directory from one server... file ownership to transfer&lt;BR /&gt;&lt;BR /&gt;Of course one way to do this is with NFS if you  don't want to use tar/cpio/pax.</description>
      <pubDate>Mon, 02 Jul 2007 20:19:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030770#M670352</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-07-02T20:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030771#M670353</link>
      <description>tar on the fly over the network:&lt;BR /&gt;# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -)&lt;BR /&gt;&lt;BR /&gt;If done as root, all permissions are preserved... even if the users don't exist on&lt;BR /&gt;the target host.&lt;BR /&gt;&lt;BR /&gt;My 2 cents,&lt;BR /&gt;Armin&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jul 2007 10:40:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030771#M670353</guid>
      <dc:creator>Armin Kunaschik</dc:creator>
      <dc:date>2007-07-03T10:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030772#M670354</link>
      <description>have to correct myself:&lt;BR /&gt;# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -"&lt;BR /&gt;&lt;BR /&gt;My 2 cents,&lt;BR /&gt;Armin&lt;BR /&gt;</description>
      <pubDate>Tue, 03 Jul 2007 10:42:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030772#M670354</guid>
      <dc:creator>Armin Kunaschik</dc:creator>
      <dc:date>2007-07-03T10:42:37Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030773#M670355</link>
      <description>have to correct myself: &lt;BR /&gt;# cd source_dir; tar -cf - .|ssh user@targethost "cd target_dir; tar -xvf -"&lt;BR /&gt;&lt;BR /&gt;Its such a wonderful single line command. I didnt quite understand on whats the "&lt;CMD&gt;" purpose? Do the double quote function is the same as ` (backtick)?&lt;/CMD&gt;</description>
      <pubDate>Fri, 28 Nov 2008 08:38:42 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030773#M670355</guid>
      <dc:creator>Mohamad Ridha</dc:creator>
      <dc:date>2008-11-28T08:38:42Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030774#M670356</link>
      <description>&amp;gt;Mohamad: ssh user@targethost "cd target_dir; tar -xvf -"&lt;BR /&gt;&amp;gt;I didn't quite understand what's the "&lt;CMD&gt;" purpose? Do the double quote function as the same as `?&lt;BR /&gt;&lt;BR /&gt;The purpose of the double quote is to pass that whole string to ssh to execute.  (Single quotes would work too.)  Otherwise the semicolon separates the ssh command from the final tar.&lt;BR /&gt;&lt;BR /&gt;You shouldn't be using the archaic ``, replace them by $().&lt;BR /&gt;&lt;/CMD&gt;</description>
      <pubDate>Fri, 28 Nov 2008 09:16:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030774#M670356</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-28T09:16:35Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030775#M670357</link>
      <description>The purpose of the double quote is to pass that whole string to ssh to execute. (Single quotes would work too.) Otherwise the semicolon separates the ssh command from the final tar.&lt;BR /&gt;&lt;BR /&gt;You shouldn't be using the archaic ``, replace them by $().&lt;BR /&gt;&lt;BR /&gt;-----------&lt;BR /&gt;&lt;BR /&gt;Thanks for the reply. Ok got it. Just need to test first using the $() thing.&lt;BR /&gt;&lt;BR /&gt;I'm a bit confused on which protocol that the command do. It looks like it doesnt use any ftp, sftp, scp command; just sending a tar archive over the SSH tunnel. Am i wrong?</description>
      <pubDate>Fri, 28 Nov 2008 09:37:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030775#M670357</guid>
      <dc:creator>Mohamad Ridha</dc:creator>
      <dc:date>2008-11-28T09:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: scp and preserving uid</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030776#M670358</link>
      <description>&amp;gt;Mohamad: Thanks for the reply.&lt;BR /&gt;&lt;BR /&gt;(If you are going to be asking more questions, you should create your own thread so you can assign points.)&lt;BR /&gt;&lt;BR /&gt;&amp;gt;Just need to test first using the $() thing.&lt;BR /&gt;&lt;BR /&gt;This example doesn't use $().&lt;BR /&gt;&lt;BR /&gt;&amp;gt;just sending a tar archive over the SSH tunnel.&lt;BR /&gt;&lt;BR /&gt;Yes, it sends it to the stdin of ssh, then to tar(1).</description>
      <pubDate>Fri, 28 Nov 2008 09:46:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/scp-and-preserving-uid/m-p/4030776#M670358</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2008-11-28T09:46:12Z</dc:date>
    </item>
  </channel>
</rss>

