ftp server

I have problems with my ftp server.

I installed pure-ftpd server but maybe something went wrong since I cannot connect through ftp.

Code:
Connected to my.ftp.server.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:12. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
331 User user OK. Password required
Password:
530 Login authentication failed
ftp: Login failed.
ftp>

and I'm sure I gave the right psw

Code:
# pkg_info pure-ftpd
pkg_info: can't find package 'pure-ftpd' installed or in a file!
and
Code:
# ps ax
.
.
.
21286  ??  Is     0:00.02 pure-ftpd (SERVER) (pure-ftpd)

how can I fix this problem? where is the problem?

PS
I also try
Code:
$ ftp localhost
Connected to localhost.
220---------- Welcome to Pure-FTPd [TLS] ----------
220-You are user number 1 of 50 allowed.
220-Local time is now 09:25. Server port: 21.
220-IPv6 connections are also welcome on this server.
220 You will be disconnected after 15 minutes of inactivity.
Name (localhost:user): user
331 User horatiu OK. Password required
Password:
530 Login authentication failed
ftp: Login failed.

thanks
 
hirohitosan said:
Code:
# pkg_info pure-ftpd
pkg_info: can't find package 'pure-ftpd' installed or in a file!
Try this:
Code:
pkg_info | grep pure
Also double-check the config file (if you use one) or the command used when you start your ftp server. I think you have something misconfigured there.

The README says:
Unlike many daemons, Pure-FTPd doesn't read any configuration file (but for
LDAP and SQL). Instead, it uses command-line options.
...
If you want to use a configuration file with Pure-FTPd, you can, through
a wrapper. That wrapper will parse a file and convert it to command-line
options. Then, the server will be started with these options.

Please have a look at the 'configuration-files' directory. Copy the sample
configuration file called 'pure-ftpd.conf' to a suitable location, say /etc...
 
dclau said:
I think you have something misconfigured there.

Me too but I don't find any configuration file. Don't know where to search.

and
Code:
pkg_info | grep pure
pure-ftpd-1.0.21_2  A small, easy to set up, fast and very secure FTP server

at least how can I deinstall and install again?
 
the configuration file should be located in /usr/local/etc/
 
danger@ said:
the configuration file should be located in /usr/local/etc/

If you run pure-config.pl /path/to/your/config it doesn't really matter where you put the configuration file, i guess, but you're right, when installed from ports the config file goes there.
 
I can be wrong but pure-ftpd can refuse login if something wrong with ftp folder ( does not exists / wrong permitions )
for more information check pure-ftpd's log

PS. From the beginning all pure-ftpd's setting passed as command line parameters, and all so-called config files are just merely hacks / parsers.
 
Thanks guys!
I deinstall pure-ftpd and install it again.

How can I automatically run the server when the system boots?

In pure-ftpd documentation says:
add the command

/usr/local/sbin/pure-ftpd &

to /etc/rc.d/rc.local or /etc/rc.d/boot.local . Don't forget the '&' sign.
but I don't have /etc/rc.d/rc.local or /etc/rc.d/boot.local

thanks
 
hirohitosan said:
How can I automatically run the server when the system boots?

Most (ok, many) FreeBSD ports use a variable in /etc/rc.conf file of the form portname_enable="YES" to enable the port. Coupled with a startup script in /usr/local/etc/rc.d, the port will be started when FreeBSD starts up.
For pureftpd, I believe the needed entry in /etc/rc.conf is:
pureftpd_enable="YES"

Hope this helps.
Oh, one more thing: you can usually run
/usr/local/etc/rc.d/scriptname rcvar
to find out which variables a script supports.
 
here what I have in /usr/local/etc/rc.d:
Code:
# ls /usr/local/etc/rc.d
020named.sh             courier-imap-imapd-ssl  postgresql
040exim.sh              courier-imap-pop3d      proftpd
050proftpd.sh           courier-imap-pop3d-ssl  pure-authd.sh
080cpanel4.sh           dovecot                 pure-ftpd
090chkservd.sh          exim                    rsyncd
apache22                htcacheclean            stunnel
chkservd.sh             httpd                   webmin
I did:
Code:
# /usr/local/etc/rc.d/pure-ftpd rcvar
# pureftpd
$pureftpd_enable=YES

and I add in
/etc/rc.conf

pureftpd_enable="YES"

but after rebooting the server still not start
 
The /etc/rc.conf edit you made has no effect unless you've also written, or otherwise have, an extended application startup script in /usr/local/etc/rc.d/ similar to:

Code:
#!/bin/sh

# PROVIDE: pureftpd
# REQUIRE: NETWORKING SERVERS
# BEFORE: DAEMON
# KEYWORD: shutdown

#
# Add the following lines to /etc/rc.conf to enable pure-ftpd:
#
# pureftpd_enable="YES"
#
# For launch uploadscript daemon define
# pureftpd_upload_enable="YES"
# pureftpd_uploadscript="/full/path/to/launch_script"
#

. /etc/rc.subr

name=pureftpd
rcvar=`set_rcvar`

load_rc_config $name

command=/usr/local/sbin/pure-config.pl
command_upload=/usr/local/sbin/pure-uploadscript
pureftpd_uploadscript=${pureftpd_uploadscript:-"/usr/bin/touch"}
pureftpd_config=${pureftpd_config:-"/usr/local/etc/pure-ftpd.conf"}
required_files=${pureftpd_config}
pidfile=/var/run/pure-ftpd.pid
pidfile2=/var/run/pure-uploadscript.pid
procname=pure-ftpd

pureftpd_enable=${pureftpd_enable:-"NO"}
command_args=${pureftpd_config}
command_upload_args="-B -r ${pureftpd_uploadscript}"

start_postcmd=start_postcmd
stop_postcmd=stop_postcmd

start_postcmd()
{
       if test -n ${pureftpd_upload_enable:-""} && checkyesno pureftpd_upload_enable; then
       echo "Starting ${command_upload}."
       ${command_upload} ${command_upload_args}  
       fi
}

stop_postcmd()
{
        if test -n ${pureftpd_upload_enable:-""} && checkyesno pureftpd_upload_enable; then
        pid=$(check_pidfile ${pidfile2} ${command_upload})
        if [ -z ${pid} ]; then
        echo "Upload script not running? (check ${pidfile2})."
        return 1
        fi
        echo "Stopping ${command_upload}."
        kill -${sig_stop:-TERM} ${pid}
        [ $? -ne 0 ] && [ -z "$rc_force" ] && return 1
        wait_for_pids ${pid}
        fi
}

run_rc_command "$1"
 
Back
Top