restored a backup and can't su to root now

Arden yardcat at comcast.net
Sun Feb 4 10:37:33 PST 2007


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




More information about the blfs-support mailing list