Subject: Problems With WUFTP and BSDI

From: Gary Banke <[email-masked]>
Date: Mon, 3 Mar 1997 12:15:32 -0800

Hello,

I'm trying to setup a secure ftp dropbox on a BSDI UNIX server for our ISP and am having difficulty in a couple of areas.

The first problem has to do with the 'ls' command.  In short, it refuses to display any files or directories when executed within wuftp.  It works fine from within the account in UNIX, but not from with ftp.

The next problem of note is the fact that when I'm ftp'd into the secure account, ftp allows me to escape to a shell (even though the shell is setup as /etc/ftponly) and traverse the directory tree from the root on down.

I suspect that I'm just not getting the ftpaccess config'd right, but the documentation is skimpy at best and I could really use some insights.

Any help would be greatly appreciated.

Best regards,

Gary Banke/Senior Systems Administrator
Pacific Northwest Networks, Inc.

Office: (503) 472-5861
FAX: (503) 472-1860

E-mail: [email-masked]

---

From: Alain Magloire <[email-masked]>
Date: Tue, 4 Mar 1997 15:04:20 -0500 (EST)

Bonjour Mr Gary Banke

> The first problem has to do with the 'ls' command.  In short, it refuses to display any files or directories when executed within wuftp.  It works fine from within the account in UNIX, but not from…

it sounds like the usuall "ls setup" problem browse through the FAQ/mailling_list
for info.

> The next problem of note is the fact that when I'm ftp'd into the secure account, ftp allows me to escape to a shell (even though the shell is setup as /etc/ftponly) and traverse the directory tree…

SAY WHAT !!!!!!
you had a shell prompt while loggin as "ftp" ?????

Even if your config files are royally screwed you should not be able
to escape from the chroot().

What version are you running ?
Did you compile it, or some unknow bin on the net ?

> I suspect that I'm just not getting the ftpaccess config'd right,

:-) probably

> but the documentation is skimpy at best

:-) understatement of the week

> and I could really use some insights.

There are some very nice people on this list, just send
something more accurate, saying that the config files aren't right
is not enough.

> Best regards,

good day

-- 
au revoir, alain

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 14:37:09 -0600 (CST)

<Bonjour Mr Gary Banke
<
<> Hello,
<> 
<> The first problem has to do with the 'ls' command.  In short, it refuses to display any files or directories when executed within wuftp.  It works fine from within the account in UNIX, but not from with ftp.
<
<it sounds like the usuall "ls setup" problem browse through the FAQ/mailling_list
<for info.

I don't know what OS you are using, but if it is Solaris 2.5.1, this thread
came to a conclusion very recently.  See the recent messages for details.

<> The next problem of note is the fact that when I'm ftp'd into the secure account, ftp allows me to escape to a shell (even though the shell is setup as /etc/ftponly) and traverse the directory tree from the root on down.
<> 
<
<SAY WHAT !!!!!!
<you had a shell prompt while loggin as "ftp" ?????

For shits and grins, when I logged in as anonymous, I was able to do !sh and
get a shell prompt.  I was then able to cd to / and do a ls -la and see
everything there.

Oh oh... is wu-ftpd drastically broken?  It certainly looks like it.

<Even if your config files are royally screwed you should not be able
<to escape from the chroot().

Unfortunately, I too can escape chroot().

<What version are you running ?

Beta 12

<Did you compile it, or some unknow bin on the net ?

Compiled it myself, so that isn't a problem.

NOT GOOD!!!!

MB
-- 
System Administrator - Finnigan FT/MS - Madison WI. <URL:http://www.ftms.com/>
e-mail: [email-masked]
phone: (608) 273-8262 ext: 612  fax: (608) 273-8719
Visit - <URL:http://www.cdsnet.net/vidiot/>  (Your link to Star Trek and UPN)

---

From: David Greenman <[email-masked]>
Date: Tue, 04 Mar 1997 12:45:53 -0800

>Oh oh... is wu-ftpd drastically broken?  It certainly looks like it.

   Uh, that spawns a shell on your *local* machine! ...this is not a problem.

-DG

David Greenman
Core-team/Principal Architect, The FreeBSD Project

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 14:48:08 -0600 (CST)

<Bonjour Mr Gary Banke
<

An update on this problem.  It is VERY MISLEADING to test the shell escape
on the same machine that has the ftp daemon.  I too freaked when I saw that.
The !sh gives you a shell for the user on the machine doing the calling.
So, do the ftp to the server from a different machine and you will find that
the shell you get is on the machine you are ftping from.

So, all is A-OK with the !sh from the ftp program.

Thanks goodness.

MB

---

From: Jim Davis <[email-masked]>
Date: Tue, 4 Mar 1997 13:51:30 -0700 (MST)

> get a shell prompt.  I was then able to cd to / and do a ls -la and see

But which system were you on?  If you're on a unixboxen, ftp to the
server, and type

!sh

then yes indeed you'll get a shell -- but on unixboxen, not the server. 
That's all happening clientside. 

Now if that also happens serverside, well then we do have a problem.

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 15:04:13 -0600 (CST)

<Now if that also happens serverside, well then we do have a problem. 

As pointed out in a previous message, it was not serverside.  In my case,
the serverside and unixboxen are one and the same.  I suspect that may be
the root of the problem with the original poster.

MB

---

From: Mark Galbraith <[email-masked]>
Date: Tue, 4 Mar 1997 13:41:53 -0800 (PST)

>>>>> "Vidiot" == Vidiot  <[email-masked]> writes:

Vidiot> Oh oh... is wu-ftpd drastically broken?  It certainly looks like
Vidiot> it.

No, it's not.  Remember that shell escapes run on the client's computer,
not the server.  When you escape with '!sh', you are running /bin/sh on
your *LOCAL* system, not the server.  Try it on a Windows box to prove
my point.  On Windows NT, the shell escape is '!cmd', which gives you a
"C" prompt.  Exit from that shell, and you are returned to the FTP
client.

-- 
Mark Galbraith                   Member of The HTML Writers Guild
Engineer, Internet Services	              http://www.hwg.org/
Triad Systems Corporation
(PGP Fingerprint=1CB9 7481 AD5C 5709  690B AC09 7F65 D6F6)

---

From: Alain Magloire <[email-masked]>
Date: Tue, 4 Mar 1997 16:51:54 -0500 (EST)

Bonjour Mr Vidiot

> Oh oh... is wu-ftpd drastically broken?  It certainly looks like it.

**NO** Mr Vidiot, you got it all wrong :-(

Sir, We're not talking about the same thing, shell escapes features that
is provided by most ftp clients is allright.

What I was refering to is in some binary version distributed on the net

_PATH_EXECPATH was set to "/bin"

in this case scenario, ... it is .. a problem and a very urging one

-- 
au revoir, alain
_______P_________O____________I______R___________E___
POIRE: Premature Optimization Is the Root of all Evil
                     D.K or is it B.K ? maybe A.M ;-)

---

From: Vidiot <[email-masked]>
Date: Tue, 4 Mar 1997 17:07:17 -0600 (CST)

<Sir, We're not talking about the same thing, shell escapes features that
<is provided by most ftp clients is allright.
<
<What I was refering to is in some binary version distributed on the net
<
<_PATH_EXECPATH was set to "/bin"
<
<in this case scenario, ... it is .. a problem and a very urging one

Ah, that point wasn't clear.  At least to me it wasn't.

MB

---

From: Gregory Youngblood <[email-masked]>
Date: Tue, 4 Mar 1997 22:04:49 -0600 (CST)

> Oh oh... is wu-ftpd drastically broken?  It certainly looks like it.

If you got a shell prompt from !sh then you should have gotten a 'local' 
shell prompt, not a remote shell.

> Unfortunately, I too can escape chroot().

I was having all kinds of problems with chroot with beta 11 and 12, but 
thanks to someone else I rechecked my inetd.conf and found out a slight 
typo was causing the -a flag to never be sent to ftpd, thus my ftpaccess 
file was not being read and with beta 11/12 changing the default 
behaviour it wasnt being read at all.

Once I fixed that, my chroot worked again. :)

Greg