Maintaining Ownership When Copying Files and Directories

Joshua Gimer jgimer at gmail.com
Tue Apr 3 14:33:33 UTC 2007


Maybe something like:

cd source; tar -cf - * | ( cd destination; tar -xfp -)

Josh

On 4/3/07, Sean McGlynn <sean_mcglynn at yahoo.com> wrote:
>
> Hello,
>
> On a RHEL4 server I have mounted a directory from another RHEL4 server.  I
> want to copy the files from the mounted directory, maintaining ownership and
> permissions.  When I attempt to do a copy as root I get a permission denied
> message.  When I do a cp -r --preserve=all as a user who is a member of a
> group who has rights to the directory I am able to do the copy, the
> permissions are maintained, but the ownership is not.  This makes sense as
> the man page for cp say you need to be root to change ownership.  So how can
> I make this happen if I can't do it as root?  The group is maintained in
> eDirectory, so I can't add root to the group.
>
> Thank you.
>
>
>
>
>
> ____________________________________________________________________________________
> It's here! Your new message!
> Get new email alerts with the free Yahoo! Toolbar.
> http://tools.search.yahoo.com/toolbar/features/mail/
> --
> redhat-list mailing list
> unsubscribe mailto:redhat-list-request at redhat.com?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



-- 
Thx
Joshua Gimer



More information about the redhat-list mailing list