Copying files and keeping owner/group - SCO

This is a discussion on Copying files and keeping owner/group - SCO ; Unfortunately we have no real unix expert here so we muddle around when we need to - thankfully thats not too often! I have setup a crontab job which copies some files overnight to another directory, ready to be picked ...

+ Reply to Thread
Results 1 to 2 of 2

Thread: Copying files and keeping owner/group

  1. Copying files and keeping owner/group

    Unfortunately we have no real unix expert here so we muddle around when we
    need to - thankfully thats not too often! I have setup a crontab job which
    copies some files overnight to another directory, ready to be picked up in
    the morning by an ftp script. The copy works but does not preserve the
    owner/group of the files - it makes them root/sys. Now I can understand
    this as the crontab job runs as root - but what I cant understand is the
    fact we created a script several months ago (unfortunetely i didnt make
    notes) and the script is exactly the same and runs in the same crontab and
    when that copies the files the owner/group is kept. Im sure this is
    something simple and I have had a quick search but found nothing.

    Thanks in advance

    ICTUser



  2. Re: Copying files and keeping owner/group

    On Aug 10, 4:49 am, "ICTUser" wrote:
    > Unfortunately we have no real unix expert here so we muddle around when we
    > need to - thankfully thats not too often! I have setup a crontab job which
    > copies some files overnight to another directory, ready to be picked up in
    > the morning by an ftp script. The copy works but does not preserve the
    > owner/group of the files - it makes them root/sys.


    try
    cp -p
    in your script.

    Now I can understand
    > this as the crontab job runs as root - but what I cant understand is the
    > fact we created a script several months ago (unfortunetely i didnt make
    > notes) and the script is exactly the same and runs in the same crontab and
    > when that copies the files the owner/group is kept.


    They're in the same directory?


    Im sure this is
    > something simple and I have had a quick search but found nothing.
    >
    > Thanks in advance
    >
    > ICTUser




+ Reply to Thread