On Feb 4, 2007, at 10:21 AM, Arnie Stender wrote:

> Dan Nicholson wrote:
>
>> Not if you did it as an unprivileged user. It'd be a security hole  
>> for
>> you to copy stuff and retain other's privileges. Only root can do
>> that. A simple `cp -a' works, but `tar' or `cpio' are probably better
>> suited for this. I move package contents around all the time with  
>> tar.
>> But, the important part is being root if you want to retain
>> ownership/permissions.
>>
>> --
>> Dan
>
> Hi Dan,
>       I don't have time right now to test tar and cpio but I do know for  
> sure
> a straight cp of an SUID file does NOT produce an SUID copy of the  
> file,
> even if done as root.
>
> Arnie

What is this -a option? My man cp doesn't show any -a option. I had  
the same trouble with cp so I have done this; cd to the partition you  
want to move and
tar cvpf - .|(cd /mnt/hda6; tar xvpf - .)

Seems to work better.
Arden

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to