Subject: Re: Foibles of a newbe
To: Mac McCaskie <mccaskie@kc.rr.com>
From: James K. Lowden <jklowden@schemamania.org>
List: netbsd-help
Date: 11/08/2003 01:44:02
On Fri, 07 Nov 2003, Mac McCaskie <mccaskie@kc.rr.com> wrote:
> 
> How to ftp with a non-root id and place files where I want, specifically
> 
> pkgsrc so I could use it to install apache.  I gave up and ftp'd it into
> 
> a home dir then proceeded to mv the file to it's proper spot.
> 
> That sure fouled up the the file system!  I had directory's moved or 
> disappeared.  The FTP client failed since it's directory moved.  Other 
> commands failed.  I tried to put things back, but things steadily 
> detereriated, telnet is still up but it is hopeless.
> 
> have a good weekend!

I think mine started off better than yours....  :-(

It sounds like you did something truly nasty, perhaps overwriting binaries
with directories or somesuch.  Without a lot of knowledge, it's very hard
to bring a machine back to a known good state if you've more-or-less
randomly scrambled it.  Probably the best thing to do -- given the box is
just recently installed and has lost the ability to execute "ftp" -- is
start over.  

You didn't have to move anything.  Something like this would have done
fine:

	$ cd   # goes $HOME
	$ ftp ftp://ftp.netbsd.org/[...]/pkgsrc.tgz
	$ cd /usr
	$ su
	  password:
	# tar -xzf ~yourusername/pkgsrc.tgz

HTH.

--jkl