[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wuftpd-questions
Subject:    RE: How to restrict  number of ftp per virtual server ?
From:       "Jaison Sebastian (jaisose)" <jaisose () cisco ! com>
Date:       2003-05-22 15:45:35
[Download RAW message or body]

Hi,
  
  Thanks you very much for your reply.

  I did everything as you said but still I am facing problem. 

And I could see the problem is coming from a function in ftpd.c.
static int AllowVirtualUser(const char *username) function ---> always
returning to a 0. I compiled the code by hard coding this to 1 then
everything worked.

The above function is returning 0 because the "virtual_address" string
in the function is not set to the anything.

Any idea why the virtual_address string in the ftpd.c is not set to the
ipaddress while using individual ftpaccess file?

I know the above description is not sufficient enough to analyze the
problem. But if you have encountered anything of this sort before then
you can help me.

Thanks in advance,
Jaison

-----Original Message-----
From: kent@wu-ftpd.org [mailto:kent@wu-ftpd.org] 
Sent: Wednesday, May 21, 2003 11:53 PM
To: jaisose@cisco.com
Cc: kent@wu-ftpd.org; wuftpd-members@wu-ftpd.org;
wuftpd-dev@wu-ftpd.org; wuftpd-questions@wu-ftpd.org
Subject: Re: How to restrict number of ftp per virtual server ?


# Hi,
# 
#   I tried making a individual ftpaccess file for the virtual ftp
server
# but I am not able to log into that ip address and getting a error #
message number 530. 
# 
# These are the steps which I did
# 
# 1) Complied the wu-ftpd (version 2.6) with --enable-virtual and #
--enable-passwd # 
# 2)Installed the ftpd binary on the solaris workstaion. (also verified
# whether it works) # 
# 3)updated "ftpservers" file so as to have directory name for the #
"ftpaccess" file for the virtual ip address.
#   This is what I gave in the ftpservers file
# 
#   192.168.45.120  /etc/ftpd/myftp/
# 
# 4)Created a ftpaccess file under the location specified in
# ftpservers.(/etc/ftpd/myftp/)
#    Please see the attached file for the content of ftpaccess file.
# 
# 5)Stoped the ftpd using ftpshut and started it using ftprestart. # 
# 6)Tried to login to virtual ftp server IP (192.168.45.120).
# 
# 7)But couldn't login and got a "530: login incorrect" message after #
entering the password. # 
# Could you please give me some hints/tips why this is happening ? # 
# Thanks in advance,
# Jaison 

Looks like you did everything right but...

Ftpshut and ftprestart do not do what you think they do...

You will need to kill the ftpserver and restart it.

I use something like the following on my solaris box.  You will 
probably want to edit it so it points at the proper paths.  You can then
link it in as /etc/rc3.d/S99ftpd so ftpd will start on reboot.

-----
#!/sbin/sh
#
# /etc/init.d/ftpd - Start/Stop the FTP daemon
#
PATH=/usr/bin:/bin

case $1 in 
'start')
        echo 'Starting wu-ftpd File Transfer Server' 
        if [ -x /etc/ftpd/bin/in.ftpd -a -f /etc/ftpd/ftpaccess ] 
        then
                /etc/ftpd/bin/in.ftpd -Sla
        fi      
        ;;
'stop')
        pid=`cat /var/run/ftpd.pid`
        if test "$pid"
        then
                kill -TERM $pid
        fi
        ;;
*)
        echo "usage: /etc/init.d/ftpd {start|stop}"
        ;;
esac
-----

-- 
Kent Landfield           |  WU-FTPD: http://www.wu-ftpd.org/

Phone: 1-817-545-2502    |  RESOURCE CENTER:
http://www.landfield.com/wu-ftpd
Email: kent@wu-ftpd.org  |  RFCS: http://www.faqs.org/rfcs/
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic