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

Re: permissions / replacing packages



-----BEGIN PGP SIGNED MESSAGE-----

On Sat, 29 Jan 2000, Dwayne C . Litzenberger wrote:

> I was moving my files back and forth to and from CD-RWs, and I just
> realised that my CDs were made with rational rockridge (sets everything to
> owned by root, read-only, and removes suid bits, and sets world-readable
> to everything), instead of standard rockridge extensions.  Whoops! 

<snip>

> Is there any way (on a Debian system), that I can get apt to re-download
> and install the packages I have currently installed over top of what's
> already here, to fix things?

I had to do something very similar just last night.  The superblock on my
/usr partition got screwed up, and I couldn't recover it.  The rest of the
system was fine.  Of course, I had to deal with some other ugliness that
you're going to be spared (e.g. dpkg is in /usr; I had to find a
replacement!).

Try something like this:
# dpkg --get-selections > /root/packages
# cat /dev/null > /var/lib/dpkg/status
# dpkg --set-selections /root/packages

Then you should be able to run dselect, select [I]nstall from the menu,
and go, assuming your sources are up to date and pointing to the right
mirrors.  Dpkg will ask you before overwriting any of your config files,
but just to be sure I kept a backup of /var and /etc.  But that probably
won't be an issue for you, since you've got everything on CD.

You'll still have to go through /var and /etc and check those perms,
because most of the contents of those directories will not be
replaced.  There may very well be a better solution to your problem.  This
is what comes to mind first for me.

Good luck.
noah

  PGP Public Key available at http://www.morgul.net/~frodo/mail.html 
  or by `finger -l frodo@morgul.net` 


-----BEGIN PGP SIGNATURE-----
Version: 2.6.3a
Charset: noconv

iQCVAwUBOJPBi4dCcpBjGWoFAQG3GgP/dw8YMTJlG09ziP7+JJHW5Bm4Sx9YIC/q
GfV+bs3i0F7d6ez9GUOTRVH6TrCsGOVfI1Bu+V/n+HnukkP2vAN9mOcI0Z1dAjPE
he+gQhk2clnecYeBq1gpB7zYJBQxYSJEBX523Thf7G19nxShvk4ICIqIkcvZSrxd
XuGvvS29onM=
=/jT/
-----END PGP SIGNATURE-----


Reply to: