Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 18 Sep 2000 15:11:09 +1000
From:      "Daniel Bryant" <daniel@connectglobal.com>
To:        <freebsd-questions@freebsd.org>
Subject:   problems jailing with proftpd
Message-ID:  <006b01c0212e$dbd73420$e38e22cb@funkmaster>

next in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
Heyas.. this is my first post to this list... so i just thought i'd say hi-ho... :-)
I'm AKA CLouD on EFnet...
anyway...

I'm having a problem with ProFTPD maybe someone can shed some light on or give suggestoins or whatever...
anything would be appreciated..
im running thge latest CVS version of proftpd 1.2-orc2 WITH mod_mysql/mod_sqlpw and FreeBSD4.0-stable

Upon ftping to the server,  users are automatically dumped into their home directory... and everything seems ok.. users can ls, cwd, pwd, and all the other funky things.. that all works fine.. for both, mysql authenticated users and system-level users...
 
As soon as i add the "DefaultRoot ~" directive, and then i ftp in with the default freebsd ftp client, heres what happens...

__________________________________________________________________

[root@connectglobal blast_area]# ftp localhost
Connected to localhost.connectglobal.com.
220 connectglobal.com FTP server ready.
Name (localhost:daniel): dev2
331 Password required for dev2.
Password:
230 User dev2 logged in.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> pwd
257 "/" is current directory.
ftp> cd htdocs
250 CWD command successful.
ftp> pwd
257 "/htdocs" is current directory.
ftp> cd images
250 CWD command successful.
ftp> pwd
257 "/htdocs/images" is current directory.
ftp> ls
421 Service not available, remote server has closed connection.
Passive mode refused.
ftp> 
______________________________________________________________________


and this is what appears in the proftpd log:
______________________________________________________________________

connectglobal.com (203.34.142.227[203.34.142.227]) - USER daniel: Login successful.
connectglobal.com (203.34.142.227[203.34.142.227]) - _get_default_root: /usr/home/daniel
connectglobal.com (203.34.142.227[203.34.142.227]) - Preparing to jail() the environment(version - '0', path - '/usr/home/daniel', hostname - 'connectglobal.com', ip_number - '203.34.142.70'
connectglobal.com (203.34.142.227[203.34.142.227]) - Environment successfully jail()ed.
connectglobal.com (203.34.142.227[203.34.142.227]) - mysql: close [0] for mod_sqlpw/2.0
connectglobal.com (203.34.142.227[203.34.142.227]) - received: PWD
connectglobal.com (203.34.142.227[203.34.142.227]) - received: SYST
connectglobal.com (203.34.142.227[203.34.142.227]) - received: PASV
connectglobal.com (203.34.142.227[203.34.142.227]) - attempted bind to 203.34.142.70, port 0
connectglobal.com (203.34.142.227[203.34.142.227]) - bind() failed in inet_create_connection(): Invalid argument
connectglobal.com (203.34.142.227[203.34.142.227]) - Check the ServerType directive to ensure you are configured correctly.
______________________________________________________________________


Ive tried running the server as various users, including root.. and also from inetd, and as standalone.. 
all give the same result.


any ideas would be great...

thanks..

CLouD.



[-- Attachment #2 --]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=iso-8859-1" http-equiv=Content-Type>
<META content="MSHTML 5.00.2614.3500" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Heyas.. this is my first post to this list... so i 
just thought i'd say hi-ho... :-)</FONT></DIV>
<DIV><FONT face=Arial size=2>I'm AKA CLouD on EFnet...</FONT></DIV>
<DIV><FONT face=Arial size=2>anyway...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I'm having a problem with&nbsp;ProFTPD maybe 
someone can shed some light on or give suggestoins or whatever...</FONT></DIV>
<DIV><FONT face=Arial size=2>anything would be appreciated..</FONT></DIV>
<DIV><FONT face=Arial size=2>im running thge latest CVS version of proftpd 
1.2-orc2 WITH mod_mysql/mod_sqlpw and FreeBSD4.0-stable</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Upon ftping to the server,  users are automatically 
dumped into their home directory... and everything seems ok.. users can ls, cwd, 
pwd, and all the other&nbsp;funky things.. that all works fine.. </FONT><FONT 
face=Arial size=2>for both, mysql authenticated users and system-level 
users...</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</FONT></DIV></DIV>
<DIV><FONT face=Arial size=2>As soon as i add the "DefaultRoot ~" directive, and 
then i ftp in <FONT face=Arial size=2>with the&nbsp;default freebsd ftp client, 
heres what happens...</FONT>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>__________________________________________________________________</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>[root@connectglobal blast_area]# ftp 
localhost<BR>Connected to localhost.connectglobal.com.<BR>220 connectglobal.com 
FTP server ready.<BR>Name (localhost:daniel): dev2<BR>331 Password required for 
dev2.<BR>Password:<BR>230 User dev2 logged in.<BR>Remote system type is 
UNIX.<BR>Using binary mode to transfer files.<BR>ftp&gt; pwd<BR>257 "/" is 
current directory.<BR>ftp&gt; cd htdocs<BR>250 CWD command 
successful.<BR>ftp&gt; pwd<BR>257 "/htdocs" is current directory.<BR>ftp&gt; cd 
images<BR>250 CWD command successful.<BR>ftp&gt; pwd<BR>257 "/htdocs/images" is 
current directory.<BR>ftp&gt; ls<BR>421 Service not available, remote server has 
closed connection.<BR>Passive mode refused.<BR>ftp&gt; </FONT></DIV>
<DIV><FONT face=Arial 
size=2>______________________________________________________________________</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>and this is what appears in the proftpd 
log:</FONT></DIV>
<DIV>
<DIV><FONT face=Arial 
size=2>______________________________________________________________________</FONT></DIV>
<DIV>&nbsp;</DIV><FONT face=Arial size=2>connectglobal.com 
(203.34.142.227[203.34.142.227]) - USER daniel: Login 
successful.<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - 
_get_default_root: /usr/home/daniel<BR>connectglobal.com 
(203.34.142.227[203.34.142.227]) - Preparing to jail() the environment(version - 
'0', path - '/usr/home/daniel', hostname - 'connectglobal.com', ip_number - 
'203.34.142.70'<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - 
Environment successfully jail()ed.<BR>connectglobal.com 
(203.34.142.227[203.34.142.227]) - mysql: close [0] for 
mod_sqlpw/2.0<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - received: 
PWD<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - received: 
SYST<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - received: 
PASV<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - attempted bind to 
203.34.142.70, port 0<BR>connectglobal.com (203.34.142.227[203.34.142.227]) - 
bind() failed in inet_create_connection(): Invalid argument<BR>connectglobal.com 
(203.34.142.227[203.34.142.227]) - Check the ServerType directive to ensure you 
are configured correctly.</FONT></DIV>
<DIV>
<DIV><FONT face=Arial 
size=2>______________________________________________________________________</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Ive tried running the server as various users, 
including root.. and also from inetd, and as standalone.. </FONT></DIV>
<DIV><FONT face=Arial size=2>all give the same result.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>any ideas would be great...</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanks..</DIV>
<DIV>&nbsp;</DIV>
<DIV>CLouD.</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV></DIV></FONT></DIV></BODY></HTML>

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?006b01c0212e$dbd73420$e38e22cb>