SCP not preserving user and group - HP UX

This is a discussion on SCP not preserving user and group - HP UX ; I must be doing something wrong. First off, I added the -p flag. When I scp a file from my AIX fileserver to another AIX or HP-UX server, the final user and group are, 0 0, ie. root:system (AIX) or ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: SCP not preserving user and group

  1. SCP not preserving user and group

    I must be doing something wrong. First off, I added the -p flag.

    When I scp a file from my AIX fileserver to another AIX or HP-UX
    server, the final user and group are, 0 0, ie. root:system (AIX) or
    root:sys (HPUX).

    Here is my test file:
    ls -l pasdvu.htm
    -rw-r----- 1 pasdev oradba 17959 Mar 21 13:57 pasdvu.htm


    Here is the command line I'm running:
    scp -p /home/orasa/pasdvu.htm hpuxserver:/home/orasa/pasdvu.htm


    Here is the end result:
    ls -l
    -rw-r----- 1 root sys 17959 Mar 21 13:57 pasdvu.htm

    Thanks Miles


  2. Re: SCP not preserving user and group

    "miles" writes:

    > I must be doing something wrong. First off, I added the -p flag.
    >
    > When I scp a file from my AIX fileserver to another AIX or HP-UX
    > server, the final user and group are, 0 0, ie. root:system (AIX) or
    > root:sys (HPUX).
    >
    > Here is my test file:
    > ls -l pasdvu.htm
    > -rw-r----- 1 pasdev oradba 17959 Mar 21 13:57 pasdvu.htm
    >
    >
    > Here is the command line I'm running:
    > scp -p /home/orasa/pasdvu.htm hpuxserver:/home/orasa/pasdvu.htm
    >
    >
    > Here is the end result:
    > ls -l
    > -rw-r----- 1 root sys 17959 Mar 21 13:57 pasdvu.htm
    >
    > Thanks Miles


    -p Preserves modification times, access times, and modes
    from the original file.

    Note that it makes no mention of file ownership, however.

    Curious if

    scp -p /home/orasa/pasdvu.htm orasa@hpuxserver:/home/orasa

    does what you want?



    --
    Todd H.
    http://www.toddh.net/

  3. Re: SCP not preserving user and group

    Hi miles

    > When I scp a file from my AIX fileserver to another AIX or HP-UX
    > server, the final user and group are, 0 0, ie. root:system (AIX) or
    > root:sys (HPUX).
    >
    > Here is my test file:
    > ls -l pasdvu.htm
    > -rw-r----- 1 pasdev oradba 17959 Mar 21 13:57 pasdvu.htm
    >
    >
    > Here is the command line I'm running:
    > scp -p /home/orasa/pasdvu.htm hpuxserver:/home/orasa/pasdvu.htm
    >
    >
    > Here is the end result:
    > ls -l
    > -rw-r----- 1 root sys 17959 Mar 21 13:57 pasdvu.htm


    It does not make sense to transport ownerships from one system to
    another system, since you cannot rely on, that the user/group ids are
    the same.
    In worst case highly security relevant files yould become accesible by
    common user groups.

    Florian

  4. Re: SCP not preserving user and group

    In comp.sys.hp.hpux miles wrote:
    > Here is my test file:
    > ls -l pasdvu.htm
    > -rw-r----- 1 pasdev oradba 17959 Mar 21 13:57 pasdvu.htm
    >
    > Here is the command line I'm running:
    > scp -p /home/orasa/pasdvu.htm hpuxserver:/home/orasa/pasdvu.htm


    You are doing that as root, i.e. login as root to hpuxserver?

    > Here is the end result:
    > ls -l
    > -rw-r----- 1 root sys 17959 Mar 21 13:57 pasdvu.htm


    The target file will have the owner of the account you used to
    authenticate on the target system.

    If you want to preserve ownership, etc, you may want to look into
    running rsync over ssh, or script an sftp batch.


    --
    MfG/Best regards
    helmut springer

  5. Re: SCP not preserving user and group

    On Mar 22, 6:05 am, Helmut Springer wrote:
    > In comp.sys.hp.hpux miles wrote:
    >
    > > Here is my test file:
    > > ls -l pasdvu.htm
    > > -rw-r----- 1 pasdev oradba 17959 Mar 21 13:57 pasdvu.htm

    >
    > > Here is the command line I'm running:
    > > scp -p /home/orasa/pasdvu.htm hpuxserver:/home/orasa/pasdvu.htm

    >
    > You are doing that as root, i.e. login as root to hpuxserver?
    >
    > > Here is the end result:
    > > ls -l
    > > -rw-r----- 1 root sys 17959 Mar 21 13:57 pasdvu.htm

    >
    > The target file will have the owner of the account you used to
    > authenticate on the target system.
    >
    > If you want to preserve ownership, etc, you may want to look into
    > running rsync over ssh, or script an sftp batch.
    >
    > --
    > MfG/Best regards
    > helmut springer


    Thanks for all you help. I am running the scp as root. I have made
    sure that /etc/passwd and /etc/group are the same on all systems. I
    guess it just isn't possible with scp. I will look into rsync.

    Thanks Miles


+ Reply to Thread