Re: Maintaining Ownership When Copying Files and Directories

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




i always like:
find . -depth -print  |cpio -pdmuv "destination"

but also
rsync -azu source target

|--------------------------------------------------------------------------|
|   Matthijs Sneijders                                                     |
|--------------------------------------------------------------------------|
|-----+---------------------------------+-----------------|
|     |   CORUS Research, Development & |                 |
|     |   Technology                    |                 |
|-----+---------------------------------+-----------------|
|     |   Building 3G16 room 3-337      |                 |
|-----+---------------------------------+-----------------|
|     |   P.O. Box 10.000               |                 |
|-----+---------------------------------+-----------------|
|     |   1970 CA IJMUIDEN              |                 |
|-----+---------------------------------+-----------------|
|     |   phone                         |   +31           |
|     |                                 |   (0)251-496400 |
|-----+---------------------------------+-----------------|
|     |   fax                           |   +31           |
|     |                                 |   (0)251-470064 |
|-----+---------------------------------+-----------------|
|     |   mail                          |   matthijs.sneij|
|     |                                 |   ders@corusgrou|
|     |                                 |   p.com         |
|-----+---------------------------------+-----------------|
|+-------------------------+---------------------------------------------|
||   "Joshua Gimer"        |                                             |
||   <jgimer@xxxxxxxxx>    |           To:        "General Red Hat Linux |
||   Sent by:              |   discussion list" <redhat-list@xxxxxxxxxx> |
||   redhat-list-bounces@re|           cc:                               |
||   dhat.com              |           Subject:        Re: Maintaining   |
||                         |   Ownership When Copying Files and          |
||   03-04-2007 16:33      |   Directories                               |
||   Please respond to     |                                             |
||   General Red Hat Linux |                                             |
||   discussion list       |                                             |
|+-------------------------+---------------------------------------------|










Maybe something like:

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

Josh

On 4/3/07, Sean McGlynn <sean_mcglynn@xxxxxxxxx> 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@xxxxxxxxxx?subject=unsubscribe
> https://www.redhat.com/mailman/listinfo/redhat-list
>



--
Thx
Joshua Gimer
--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list


**********************************************************************
This transmission is confidential and must not be used or disclosed by
anyone other than the intended recipient. Neither Corus Group Plc nor
any of its subsidiaries can accept any responsibility for any use or
misuse of the transmission by anyone.

For address and company registration details of certain entities
within the Corus group of companies, please visit
http://www.corusgroup.com/entities

**********************************************************************


-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list

[Index of Archives]     [CentOS]     [Kernel Development]     [PAM]     [Fedora Users]     [Red Hat Development]     [Big List of Linux Books]     [Linux Admin]     [Gimp]     [Asterisk PBX]     [Yosemite News]     [Red Hat Crash Utility]


  Powered by Linux