Anonymous Ftp Server Setup

From: Simran Hansrai (sparc@pacbell.net)
Date: Thu Mar 20 2003 - 04:50:20 EST


Hi Guys,

I am trying to setup an anonymous ftp server on a sparc2 running sol. 9.
 I have completed the following steps:

1. created an ftp user.
ftp:x:102:1::/export/home/ftp/./:/bin/sh

2. created the following dirs. under /export/home/ftp:
drwxr-xr-x 2 ftp other 512 Mar 19 22:40 bin
drwxr-xr-x 2 ftp other 512 Mar 19 22:46 dev
drwxr-xr-x 2 ftp other 512 Mar 19 22:39 etc
-rw-r--r-- 1 ftp other 157 Mar 19 22:36 local.login
-rw-r--r-- 1 ftp other 174 Mar 19 22:36 local.profile
drwxr-xr-x 2 ftp other 512 Mar 19 22:36 opt
drwxrwxrwx 2 ftp other 512 Mar 19 22:47 pub
drwxr-xr-x 3 ftp other 512 Mar 19 22:49 usr

3. copied /etc/passwd, /etc/netconfig and /etc/group files to
/export/home/ftp/etc and chmod it to 444
-r--r--r-- 1 root other 290 Mar 19 22:38 group
-r--r--r-- 1 root other 1239 Mar 19 22:39 netconfig
-r--r--r-- 1 root other 616 Mar 19 22:39 passwd

4. copied /usr/bin/ls into /export/home/ftp/bin/ls and chmod it to 111
---x--x--x 1 root other 19084 Mar 19 22:40 ls

5. setup special devices using mknod under the /export/home/ftp/dev dir:
crw-r--r-- 1 root other 42, 0 Mar 19 22:46 tcp
crw-r--r-- 1 root other 13, 12 Mar 19 22:46 zero

6. chmod 555 on /export/home/ftp
dr-xr-xr-x 8 root other 512 Mar 20 01:24 ftp

7. made pub dir and chmod it to 777
drwxrwxrwx 2 ftp other 512 Mar 19 22:47 pub

8. copied /usr/lib/libc.so.1 & /usr/lib/ld.so.1 to /export/home/ftp/usr/lib/
-rwxr-xr-x 1 root other 184040 Mar 19 23:02 ld.so.1
-rwxr-xr-x 1 root other 855484 Mar 19 22:49 libc.so.1

9. passwd -d ftp

Now, when I try to ftp from the localhost and issue the ls command I get
the following:
ftp> ls
200 PORT command successful.
150 Opening ASCII mode data connection for file list.
local.login
local.profile
226 Transfer complete.
28 bytes received in 0.0043 seconds (6.43 Kbytes/s)

But, when I try to ftp from another host to this one and issue the ls
command I get the following:
ftp> ls
227 Entering Passive Mode (192,168,1,11,98,145)
150 Opening ASCII mode data connection for /bin/ls.
226 Transfer complete.

& it does not even show the local.* files. In both the cases I dont see
any of my directories. Any suggestions or comments would be very
appreciated. I have a feeling I am don't something wrong with the file
permissions, but not sure what exactly. I also don't see any error
messages in the /var/adm/messages file.

Thanks in advance,
Simran H.
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:26:02 EDT