YGP has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I suucesfully installed NetFtp Server and started the server on a Solaris machine. From a remote system I ftpd in to the Solaris box and able to login as anonymous user
ftp> status Connected to sever_name. Type: ascii; Verbose: On ; Bell: Off ; Prompting: On ; Globbing: On Debugging: Off ; Hash mark printing: Off .

but when I give a command like 'ls' it fails, it says
ftp> ls Connection closed by remote host.

this is my configeration file
debug: 1 port: 8026 daemon mode: 1 run in background: 1 # maintainer email: bob@example.com error log: /etc/ftpd.errors allow anonymous: 1 pam authentication: 1 client logging: /etc/ftpd.log chdir message file: .message retrieve rule: $pathname ne "/etc/passwd" && $filename ne +".htaccess" home directory: / store rule: !$user_is_anonymous || $dirname =~ m|^/incomin +g/| allow site exec command: 1
This is the error i got in my ftpd.error file
Resource limit RLIMIT_NPROC cannot be set. This may be because the BSD +::Resource module is not available on your system, or it may be becau +se your operating system does not support RLIMIT_NPROC. Without resou +rce limits, the FTP server may be open to denial of service (DoS) att +acks. The real error was: at /Perl_Modules/new/lib/site_perl/Net/FTP +Server.pm line 3270. no ftp user in password file...... at /Perl_Modules/new/lib/site_perl/ +Net/FTPServer/Full/Server.pm line 285, <STDIN> line 2. Net::FTPServer::__ANON__('no ftp user in password file...... at /P +erl_Modules/new/lib/site_perl/Net/FTPServer/Full/Server.pm line 285 Net::FTPServer::Full::Server::user_login_hook('Net::FTPServer::Ful +l::Server=HASH(0x2f914)', 'anonymous', 1) called at /Perl_Modules/new +/lib/site_perl/Net/FTPServer.pm line 4662 Net::FTPServer::_PASS_command('Net::FTPServer::Full::Server=HASH(0 +x2f914)', 'PASS', 'xxx.aa.com') called at /Perl_Modules/new/lib/site_ +perl/Net/FTPServer.pm line 3002 Net::FTPServer::run('Net::FTPServer::Full::Server') called at ftpd +.pl line 35

Replies are listed 'Best First'.
Re: Net Ftp Server
by Corion (Patriarch) on Mar 14, 2008 at 12:33 UTC

    I interpret the error message no ftp user in password file just as that. As soon as you read the documentation, you find that for anonymous access you need to have the appropriate system user on your system.

    As an aside, how do you think your node title describes your node? Does it fit well? How does this node differ from Net FTPServer? Your node titles are not really descriptive and I'd like you to put more effort into giving your nodes a descriptive title. How (Not) To Ask A Question has good hints on node titles too.

      Sorry for that, Now I have changed the node title. I created a password file but now it fails here
      cannot chroot: /Perl_Modules/new/etc: Not owner at /Perl_Modules/new/l +ib/site_perl/Net/FTPServer/Full/Server.pm line 277.
      any ways Net ftp documentaion says that in http://search.cpan.org/~rwmj/Net-FTPServer-1.122/lib/Net/FTPServer.pm Anonymous logins are not affected by the password file option. Use the allow anonymous flag to control whether anonymous logins are permitted in the Full back-end..
Re: Net Ftp Server
by moritz (Cardinal) on Mar 14, 2008 at 12:29 UTC
    Did you actually read the error message?

    It says it needs BSD::Resource, and it can't seem to find it.

    Did you install that module? Can you use it from other perl scripts? (try perl -MBSD::Resource -e1, if it prints an error you know that the module is not installed correctly).

      I installed that module. I did perl -MBSD::Resource -e1 and there is no error.