Subject: ls

From: Guiming Ye <[email-masked]>
Date: Thu, 25 Mar 1999 16:30:20 -0800

Hi:
  I'm setting up wu-ftpd on my Solaris 2.5.1 machine. Everytime I login
the ftp server and type ls. Always show the following error messages.
Any idea? Please help , thank you!

ftp> ls
200 PORT command successful.
425 Can't create data socket (0.0.0.0,20): No such file or directory.

----------------WorldRes, Inc---------------
Guiming Ye
Unix System Administrator
Tel:650-372-1700(176)      Fax:650-372-1701
E-mail:[email-masked] or [email-masked]
--------------------------------------------

---

From: Gregory A Lundberg <[email-masked]>
Date: Thu, 25 Mar 1999 20:40:35 -0500 (EST)

> 425 Can't create data socket (0.0.0.0,20): No such file or directory.

This is specifically covered in the FAQ.

The location of the latest version of wu-ftpd can be found in the 
directory
 
      ftp://ftp.vr.net/pub/wu-ftpd/
 
wu-ftpd Resource Center:  http://www.landfield.com/wu-ftpd/
wu-ftpd FAQ:              http://www.cetis.hvu.nl/~koos/wu-ftpd-faq.html
wu-ftpd list archive:     http://www.landfield.com/wu-ftpd/mail-archive/

-- 

Gregory A Lundberg              Senior Partner, VRnet Company
1441 Elmdale Drive              [email-masked]
Kettering, OH 45409-1615 USA    1-800-809-2195

---

From: Leif Ericksen <[email-masked]>
Date: Fri, 26 Mar 1999 09:45:14 -0600

This is a long message.  IF you do now need to know how to setup ftp for
solaris you can ignore this message.  IF you want to know how to do so
go on and read it.

NUMBER 1 READ THE FAQ..  RTFM!!!!!!!!!
The FAQ that the developers produced WORKS GREAT!   
try a man ftpd

NUMBER 2 READ THE FAQ!!

NUMBER 3  Yes I had problems setting this up.  Mostly with the ftpaccess
file and getting this sqaured away, and my own fault for not setting
some other itmes up correctly.  i.e  ~user/dev files.

NUMBER 4 look at the FAQ
Michael Brennen Wrote a document entitled wu-ftpd guest accounts it is
available via the FAQ I do believe  GET IT.   It has good information in
it.

NUMBER 5  Gregory hmself has a document availale called HOWTO get it.
ftp://ftp.vr.net/pub/wu-ftpd/upload.configuration.HOWTO  (sorry to the
author if Gregory is not the author...)

NUMBER 6 The FAQ points to a document called ANONYMOUS FTP CONFIGURATION
GUIDELINES  GET IT.

NUMBER 7 Look for a document How to set up a Secure Anonymous FTP site.

NUMBER 8 I have included my setup  It works on the following....

	Sun Sparc 2.5, 2.5.1, 2.6 with 2.4.B18-vr[14 and 16]

1)  In /etc/passwd set up an account for user (NOTE THIS Is for a
VIRUTAL type account, and it shoudl work the same for local users.. 
Just eliminate /./ after the directory for hte user.)
> sgsftp:x:10002:44:TEST VFTP:/export/web/htdocs/test_site/./:/bin/ftponly
Make sure you have a line in /etc/shadow with the login-ID and Password.

2) Make sure you create the REQUIRED files in the respective FTP
directory...  SYMBOLIC Links should work just fine as well.

>    2 drwxrwxr-x   3 root     other        512 Feb 25 12:42 usr

In dev have the following files.  Do ls -l of the real /dev/[zero,tcp]
major and minor numbers
mknod [tcp/zero] c Major minor 
USE THE MAJOR AND MINOR OF YOUR SYSTEM!

>    2 drwxr-xr-x   2 root     other        512 Mar 24 09:00 dev
>    0 crw-r--r--   1 root     other     13, 12 Mar 24 09:00 zero
>    0 crw-r--r--   1 root     other     11, 42 Mar 24 09:00 tcp

In the ~user/bin I have the following:
>    2 drwxrwxr-x   2 root     other        512 Feb 25 13:37 bin
>   34 ---x--x--x   1 root     other      16644 Feb 25 13:37 dir
>   34 ---x--x--x   1 root     other      16644 Feb 25 13:37 ls
I do belive that you have to have in this bin directory all the things
you desire to allow the user to have.

In the ~user/etc I have the following:
>    2 drwxrwxr-x   2 root     other        512 Feb 25 12:44 etc
>    2 -r--------   1 root     other         66 Feb 25 13:01 shadow
>    2 -r--r--r--   1 root     other        106 Feb 25 12:49 passwd
>    2 -r--r--r--   1 root     other        184 Feb 25 12:49 group
Now if I remeber and understand correctly the above files are not
required at all.

OK REMEBER that the lib files you need to add are usually located in
/usr/lib so you have the following!
PLEASE NOTE The permissions are WRONG HERE r-x is all you really need to
have...  correct for your systems.  This instance on my server was for
internal tests.
>    2 drwxrwxr-x   3 root     other        512 Feb 25 12:42 usr
>    2 drwxrwxr-x   2 root     other        512 Feb 25 13:04 lib
>  
>   78 -rwxrwxr-x   1 root     other      39932 Feb 25 13:04 libw.so.1
>   32 -rwxrwxr-x   1 root     other      15720 Feb 25 13:04 libintl.so.1
>   32 -rwxrwxr-x   1 root     other      15720 Feb 25 13:04 libintl.so
>    8 -rwxrwxr-x   1 root     other       3484 Feb 25 13:04 libdl.so.1
> 1328 -rwxrwxr-x   1 root     other     665252 Feb 25 13:03 libc.so.1
>  272 -rwxrwxr-x   1 root     other     124720 Feb 25 13:03 ld.so.1
>   48 -rwxrwxr-x   1 root     other      24576 Feb 25 13:03 ld.so

NOW When I log into the system I get the following.
 ftp site.name
Connected to site.name.
220 ftp.test_site.org FTP server (WUFTPD) ready.
		( Sorry Greg, and other WUFTP Developers...  For security I do not
include the exact version number.  Should I put another message in
			let me know and I will do so. )
Name (SITE.name:leif): sgsftp
331 Password required for sgsftp.
Password:
230 User sgsftp logged in.  Access restrictions apply.
ftp> 

a ls -l gives the following!
ftp> ls -l
200 PORT command successful.
150 Opening ASCII mode data connection for /bin/ls.
total 172
drwxr-xr-x   2 10002    44           512 Jan 19 22:04 agent
drwxr-xr-x   3 10002    44           512 Jan 21 19:10 agents
-rw-rw-rw-   1 10002    44           206 Mar 26 14:39 arrowdown.gif
-rw-rw-rw-   1 10002    44           116 Dec 16 00:51 arrowup.gif
drwxrwxrwx   3 10002    44           512 Dec 29 21:02 barrett
drwxrwxr-x   2 0        1            512 Feb 25 19:37 bin
-rw-rw-rw-   1 10002    44          1658 Jan 12 20:25 black.html
drwxr-xr-x   2 0        1            512 Mar 24 15:00 dev
drwxrwxr-x   2 0        1            512 Feb 25 18:44 etc
-rw-rw-rw-   1 10002    44          5697 Oct 21 19:57
fam_funds-interm.html
-rw-rw-rw-   1 10002    44          5704 Oct 21 19:57 fam_funds-mid.html
-rw-rw-rw-   1 10002    44          6412 Oct 21 20:56
fam_funds-small.html
drwxrwxr-x   2 10002    44           512 Dec  4 16:28 hdlm
-rw-r--r--   1 10002    44         11031 Jan 18 16:17 hlm_manual.html
-rw-rw-rw-   1 10002    44           327 Oct 21 16:21 home2.html
drwxrwxr-x   2 10002    44           512 Jan 12 20:22 html
drwxrwxr-x   2 10002    44          6144 Mar 18 21:37 images
-rw-rw-rw-   1 10002    44          1918 Jan 21 16:12 index.html
drwxr-xr-x   2 10002    44           512 Jan 21 19:05 mytest
drwxr-xr-x   3 10002    44           512 Jan 15 20:16 netshare
drwxrwxr-x   2 10002    44           512 Dec  3 19:53 references
-rw-r--r--   1 10002    44         25575 Mar 26 14:31 smember.html
-rw-r--r--   1 10002    44          1629 Mar 24 21:50 test Doc1.htm
-rw-rw-rw-   1 10002    44           208 Oct 21 16:21 top2.html
-rw-rw-rw-   1 10002    44           152 Dec 16 00:54 trashcan.gif
drwxrwxr-x   3 0        1            512 Feb 25 18:42 usr
-rw-rw-rw-   1 10002    44          1547 Oct 21 16:21 white.html
226 Transfer complete.
remote: -l
1775 bytes received in 0.17 seconds (10 Kbytes/s)
ftp> 

Sorry if I sounded crass but I saw two folks with questions about
setting up the FTP so I figured I would go over what I did to make it
work.
I also agree with Wally that folks that do not have the chroot working
are setting it up incorectly...  Gregory can attest to this.  I had
problems setting the system up and with his help I was able to figure
out that it was mostly caused by some problems with /etc/passwd and
/etc/ftpaccess.  Once I got those items fix it worked GREAt and still
does.   Granted CERT and CIAC may state there are holes in the product
BUT if you can do a better job you write the software yourself.   Then
we can see what one is better.

						-- Leif Ericksen
							[email-masked]

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 26 Mar 1999 12:08:24 -0500 (EST)

> author if Gregory is not the author...)

I am.

> include the exact version number.  Should I put another message in let
> me know and I will do so. )

220 ftp.vr.net FTP server ready.

You will note that ftp.vr.net doesn't even admit openly that it runs
WU-FTPD.  I s'pose I coule add an option to admit that without the version
numbers so you don't ahve to hand-hack the daemon ...

--

---

From: Dave Wreski <[email-masked]>
Date: Fri, 26 Mar 1999 10:25:41 -0500 (EST)

> numbers so you don't ahve to hand-hack the daemon ...

That would really be great.  I currently have to do this, and a "#define
VERSION=" in the config would be easier than merging patches, etc..

I'm sure it can be argued that since the version can be changed, that it must be
at least some form of open-source ftp, as it's not possible to do with vendor
binaries, but at least it will keep them guessing...

Thanks,
Dave

---

From: Gregory A Lundberg <[email-masked]>
Date: Fri, 26 Mar 1999 12:46:02 -0500 (EST)

On Fri, 26 Mar 1999, Dave Wreski wrote:

> > I s'pose I could add an option to admit that without the version
> > numbers so you don't have to hand-hack the daemon ...
> 

I was thinking adding 'noversion' to the greeting ftpaccess clause.

greeting noversion

would then yield

220 ftp.vr.net FTP server (wu-ftpd) ready.

I'll take a look at what it'll take to force a VERSION string in the
config.h file, but the question is: should that effect the STAT output as
well?

--

---

From: "Alex Yu" <[email-masked]>
Date: Mon, 3 May 1999 12:50:46 -0400

> I was thinking adding 'noversion' to the greeting ftpaccess clause.

well.. i think what we should do is to include a var in ftpaccess, like
servername.  then users can choose whether or not that they want to
overwrite the string.

alex