restored a backup and can't su to root now

Dan Nicholson dbn.lists at gmail.com
Sun Feb 4 08:27:30 PST 2007


On 2/4/07, P R Figueiredo <pedrorfigueiredo at sapo.pt> 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.

--
Dan



More information about the blfs-support mailing list