restored a backup and can't su to root now

Barius Drubeck barius.drubeck at
Mon Feb 5 03:09:47 PST 2007

On Sunday 04 February 2007 17:27, Dan Nicholson wrote:
> On 2/4/07, P R Figueiredo <pedrorfigueiredo at> wrote:
> > Baho Utot wrote:
> > > Check that su is SUID
> > >
> > > [scrat at scrat ~]$ ls -la /bin/su
> > > -rwsr-xr-x 1 root root 24060 Jan 10 10:06 /bin/su
> >
> > Yep, that was it, thanks. It seems permissions were not copied
> > through the backup process. For instance, now the /tmp dir wasn't
> > writeable by common users either. I'm kind of worried that
> > there's more stuff messed up. I used some back up instructions
> > that were mentioned on this list a couple of weeks ago, with "cp
> > -dpRv". Shouldn't this command correctely copy all the file
> > permissions?
> 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.

Of course, you also need that the destination filesystem supports this 
kind of security info, e.g. not VFAT!


More information about the blfs-support mailing list