LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 09-20-2004, 06:49 AM   #1
wiky007
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 10
Posts: 4

Rep: Reputation: 0
proFTPd problems


hi,
im new to linux and had a friend come and set the ftp server up on my comp and it was working then when i rebooted linux i could access it (localhost) i get an error message as follows:

Connected to localhost.
421 Service not available, remote server has closed connection

could someone help me out, i also got a friend to try and he couldnt log in either

thanks
 
Old 09-20-2004, 06:55 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Restart the service. I'm guessing your friend didn't edit your startup scripts.

See if you can't start proftpd by simply typing as root in the console or in a terminal:

# proftpd &

If it starts with no errors, then try connecting.
 
Old 09-20-2004, 08:31 AM   #3
wiky007
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 10
Posts: 4

Original Poster
Rep: Reputation: 0
i get a message saying [1] 1855

Last edited by wiky007; 09-20-2004 at 08:32 AM.
 
Old 09-20-2004, 08:43 AM   #4
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
wiky007,

what distro are you using?
Most likely you have to edit your inetd service. ProFTPd doesnt like it that much
You might want to use vsftpd instead. Its used by many of the big boys as well ( ftp.gnu.org, ftp.kernel.org, ftp.redhat.com, and the list goes on )
Its easy to install and configure, and i think youll find it to be ok.

The message you got when you typed "proftpd &" means proftpd was loaded in the background. proftpd is not meant to be started like that, to start proftpd simply type "proftpd" as root without the ". if you get any error messages, please post them here.

If you want to know how to install vsftpd you can look here: http://www.vsftpdrocks.org/source/

- ^OmeS^
 
Old 09-20-2004, 08:51 AM   #5
wiky007
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 10
Posts: 4

Original Poster
Rep: Reputation: 0
thanks,
still doesnt work, got the same message that i got when i tried connecting to it and im using Slackware 10
 
Old 09-20-2004, 09:11 AM   #6
wiky007
LQ Newbie
 
Registered: Sep 2004
Distribution: Slackware 10
Posts: 4

Original Poster
Rep: Reputation: 0
ok, i dont know if this helps, but since i am a newbie i would have no idea.

i just installed vsFTPd and i got the following message when i tried to start it

[2] 2284
500 OOPS: could not bind listening IPv4 socket

Hope that helps

Last edited by wiky007; 09-20-2004 at 09:56 AM.
 
Old 09-21-2004, 05:47 AM   #7
Ian Fleeton
LQ Newbie
 
Registered: May 2003
Location: Doncaster, UK
Distribution: Slackware 10
Posts: 20

Rep: Reputation: 0
with vsftpd, it may not be starting because inetd is listening on the ftp port already (to hand over to proftpd)
I noticed I had this problem when inetd was still configured to run the ftp and I was trying to start proftpd manually (by typing proftpd)
in /var/log/proftpd.log I got

Sep 21 11:00:39 linux proftpd[13198] linux.linux: Failed binding to 0.0.0.0, port 21: Address already in use
Sep 21 11:00:39 linux proftpd[13198] linux.linux: Check the ServerType directive to ensure you are configured correctly.

I'm also using slack 10

What I've just done to get standalone going (for proftpd) is

1) su
2) edit /etc/inetd.conf and comment out the ftp line with proftpd in it (so inetd wont handle ftp)
3) edit /etc/proftpd.conf and commented out servertype inetd and removed the comment for servertype standalone (ie, switch from inetd to standalone)
4) kill -HUP [inetd pid] (using 'ps ax' to get the process id) - this will restart inetd without listening for ftp server, freeing up the ftp port
5) proftpd
6) switch to normal user again, ftp localhost (should work)







While I'm on this, I'm not sure why the inetd setup wouldn't work; the config file is pasted below, as I had it when I was trying to run proftpd with inetd, but was getting the "421 Service not available, remote server has closed connection" message (nothing showed up in the proftd log)

# See "man 8 inetd" for more information.
#
# If you make changes to this file, either reboot your machine or send the
# inetd a HUP signal:
# Do a "ps x" as root and look up the pid of inetd. Then do a
# "kill -HUP <pid of inetd>".
# The inetd will re-read this file whenever it gets that signal.
#
# <service_name> <sock_type> <proto> <flags> <user> <server_path> <args>
#
# The first 4 services are really only used for debugging purposes, so
# we comment them out since they can otherwise be used for some nasty
# denial-of-service attacks. If you need them, uncomment them.
# echo stream tcp nowait root internal
# echo dgram udp wait root internal
# discard stream tcp nowait root internal
# discard dgram udp wait root internal
# daytime stream tcp nowait root internal
# daytime dgram udp wait root internal
# chargen stream tcp nowait root internal
# chargen dgram udp wait root internal
time stream tcp nowait root internal
time dgram udp wait root internal
#
# These are standard services:
#
# File Transfer Protocol (FTP) server:
ftp stream tcp nowait root /usr/sbin/tcpd proftpd
#
# Telnet server:
#telnet stream tcp nowait root /usr/sbin/tcpd in.telnetd
#
# The comsat daemon notifies the user of new mail when biff is set to y:
comsat dgram udp wait root /usr/sbin/tcpd in.comsat
#
# Shell, login, exec and talk are BSD protocols
#
#shell stream tcp nowait root /usr/sbin/tcpd in.rshd -L
#login stream tcp nowait root /usr/sbin/tcpd in.rlogind
# exec stream tcp nowait root /usr/sbin/tcpd in.rexecd
# talk dgram udp wait root /usr/sbin/tcpd in.talkd
ntalk dgram udp wait root /usr/sbin/tcpd in.talkd
#
# To use the talk daemons from KDE, comment the talk and ntalk lines above
# and uncomment the ones below:
# talk dgram udp wait root /usr/sbin/tcpd /opt/kde/bin/kotalkd
# ntalk dgram udp wait root /usr/sbin/tcpd /opt/kde/bin/ktalkd
#
# Kerberos authenticated services
#
# klogin stream tcp nowait root /usr/sbin/tcpd rlogind -k
# eklogin stream tcp nowait root /usr/sbin/tcpd rlogind -k -x
# kshell stream tcp nowait root /usr/sbin/tcpd rshd -k
#
# Services run ONLY on the Kerberos server
#
# krbupdate stream tcp nowait root /usr/sbin/tcpd registerd
# kpasswd stream tcp nowait root /usr/sbin/tcpd kpasswdd
#
# POP and IMAP mail servers
#
# Post Office Protocol version 3 (POP3) server:
#pop3 stream tcp nowait root /usr/sbin/tcpd /usr/sbin/popa3d
# Internet Message Access Protocol (IMAP) server:
#imap2 stream tcp nowait root /usr/sbin/tcpd imapd
#
# The Internet Unix to Unix copy (UUCP) service:
# uucp stream tcp nowait uucp /usr/sbin/tcpd /usr/lib/uucp/uucico -l
#
# Tftp service is provided primarily for booting. Most sites
# run this only on machines acting as "boot servers."
# tftp dgram udp wait nobody /usr/sbin/tcpd in.tftpd
# bootps dgram udp wait root /usr/sbin/bootpd bootpd
#
# Finger, systat and netstat give out user information which may be
# valuable to potential "system crackers." Many sites choose to disable
# some or all of these services to improve security.
# Try "telnet localhost systat" and "telnet localhost netstat" to see that
# information yourself!
finger stream tcp nowait nobody /usr/sbin/tcpd in.fingerd -u
# systat stream tcp nowait nobody /usr/sbin/tcpd /bin/ps -auwwx
# netstat stream tcp nowait root /usr/sbin/tcpd /bin/netstat -a
#
# Ident service is used for net authentication
# Since we start identd as nobody, it can't write a .pid file in /var/run, so tell it
# to use /dev/null. This is of little importance unless you run identd as a
# standalone daemon anyway.
auth stream tcp wait nobody /usr/sbin/in.identd in.identd -P/dev/null
#
# These are to start Samba, an smb server that can export filesystems to
# Pathworks, Lanmanager for DOS, Windows for Workgroups, Windows95, Lanmanager
# for Windows, Lanmanager for OS/2, Windows NT, etc.
# If you're running smbd and nmbd as daemons in /etc/rc.d/rc.samba, then you
# shouldn't uncomment these lines.
#netbios-ssn stream tcp nowait root /usr/sbin/smbd smbd
#netbios-ns dgram udp wait root /usr/sbin/nmbd nmbd
#
#Samba Web Administration Tool:
#swat stream tcp nowait.400 root /usr/sbin/swat swat
#
# Sun-RPC based services.
# <service name/version><sock_type><rpc/prot><flags><user><server><args>
# rstatd/1-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rstatd
# rusersd/2-3 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rusersd
# walld/1 dgram rpc/udp wait root /usr/sbin/tcpd rpc.rwalld
#
# End of inetd.conf.


Thanks,
Ian
 
Old 09-22-2004, 10:50 AM   #8
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
# File Transfer Protocol (FTP) server:
ftp stream tcp nowait root /usr/sbin/tcpd proftpd

this is the line in /etc/indetd.conf you need to comment out. When youve done that you need to restart inetd.. just do "killall -HUP inetd" without the "'s.. The INSTALL file in the source directory says this prertty clearly, though i suppose you havent read it

Read and follow the INSTALL file in your vsftpd source tree! Its fail-safe.

- ^OmeS^

Last edited by omes; 09-22-2004 at 11:47 AM.
 
Old 09-22-2004, 11:26 AM   #9
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
I have to upgrade my vsftpd so ill just post what i do here so you can follow me :)

(17:54:14) omes@Glove:~/packages$ wget ftp://vsftpd.beasts.org/users/cevans/vsftpd1.2.1.tar.gz
(17:54:37) omes@Glove:~/packages$ tar zxvf vsftpd-1.2.1.tar.gz
(17:54:53) omes@Glove:~/packages$ cd vsftpd-1.2.1
(17:55:32) omes@Glove:~/packages/vsftpd-1.2.1$ make
(17:57:02) omes@Glove:~$ su -
Password:
(17:57:04) ROOT@Glove:~# mkdir /usr/share/empty/
* ( With Slackware you got all the next stuff in INSTALL already done, so ill just jump to make install ) *
(17:59:49) ROOT@Glove:/home/omes/packages/vsftpd-1.2.1# cp vsftpd.conf /etc/
(17:59:59) ROOT@Glove:/home/omes/packages/vsftpd-1.2.1# pico /etc/vsftpd.conf
Code:
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=nobody
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
nopriv_user=ftpsecure
async_abor_enable=NO
ascii_upload_enable=NO
ascii_download_enable=NO
ftpd_banner=Glove vsFTPd server
deny_email_enable=YES
banned_email_file=/etc/vsftpd.ban
ls_recurse_enable=YES
listen=YES
(18:03:04) ROOT@Glove:/home/omes/packages/vsftpd-1.2.1# useradd -g users -s /bin/false ftpsecure
(18:05:40) ROOT@Glove:~# pico /etc/inetd.conf
Code:
# File Transfer Protocol (FTP) server:
#ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  proftpd
(18:06:50) ROOT@Glove:~# killall -HUP inetd
(18:07:34) ROOT@Glove:/home/omes/packages/vsftpd-1.2.1# touch /etc/vsftpd.ban
(18:08:59) ROOT@Glove:~# /usr/local/sbin/vsftpd &
[1] 3627
(18:09:12) ROOT@Glove:~# ftp localhost
Connected to localhost.
220 Glove vsFTPd server
Name (localhost:omes):
* ( So now we know the server works without inetd.. lets try to get it working with inetd :) ) *
(18:11:56) ROOT@Glove:~# pico /etc/inetd.conf
Code:
# File Transfer Protocol (FTP) server:
ftp stream tcp nowait root /usr/sbin/tcpd /usr/local/sbin/vsftpd
(18:12:01) ROOT@Glove:~# killall -HUP inetd
(18:12:05) ROOT@Glove:~# killall -9 vsftpd
(18:12:09) ROOT@Glove:~# pico /etc/vsftpd.conf
Code:
anonymous_enable=YES
local_enable=YES
write_enable=YES
local_umask=022
anon_upload_enable=YES
anon_mkdir_write_enable=NO
dirmessage_enable=YES
xferlog_enable=YES
connect_from_port_20=YES
chown_uploads=YES
chown_username=nobody
xferlog_file=/var/log/vsftpd.log
xferlog_std_format=YES
idle_session_timeout=600
data_connection_timeout=120
nopriv_user=ftpsecure
async_abor_enable=NO
ascii_upload_enable=NO
ascii_download_enable=NO
ftpd_banner=Glove vsFTPd server
deny_email_enable=YES
banned_email_file=/etc/vsftpd.ban
ls_recurse_enable=YES
* ( Simply remove the listen=YES line ) *

(18:13:36) ROOT@Glove:~# vsftpd
500 OOPS: vsftpd: does not run standalone, must be started from inetd

* ( Cool lets try logging in through ftp then.. ) *

(18:13:51) ROOT@Glove:~# ftp localhost
Connected to localhost.
220 Glove vsFTPd server
Name (localhost:omes):

* ( Lets get anonymous to work ) *

(18:42:54) ROOT@Glove:/home/ftp# chmod 755 /home/ftp/incomming/
(18:43:18) ROOT@Glove:/home/ftp# chown nobody:ftp /home/ftp/incomming/

Now you should be able to log in through anonymous as well, and store files under /home/ftp/incomming

We've just installed our own ftp server, and its using inetd :) Hope you like this..

- ^OmeS^

Ps.: i forgot to get the anon stuff working.. its fixed now i guess :p

Last edited by omes; 09-22-2004 at 11:45 AM.
 
Old 09-22-2004, 11:30 AM   #10
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Debian 8
Posts: 419

Rep: Reputation: 30
i had the same problem earlier, all i did was comment out the ftpd lines in the /etc/inetd file, kill -9 'cat /var/run/inetd.pid' && proftpd && inetd kind of a hack way of doing it but it worked =)

Last edited by AAnarchYY; 09-22-2004 at 11:31 AM.
 
Old 09-22-2004, 11:47 AM   #11
omes
Member
 
Registered: Jan 2003
Distribution: debian, FreeBSD
Posts: 120

Rep: Reputation: 15
As ive posted in the "howto" above you can simply use killall -HUP inetd to restart inetd..

- ^OmeS^
 
Old 09-22-2004, 11:49 AM   #12
AAnarchYY
Member
 
Registered: Sep 2004
Location: Carlisle, MA
Distribution: Debian 8
Posts: 419

Rep: Reputation: 30
well what i did worked just fine and i haven't had to muck with it since, so i'm happy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Proftpd problems soulwatcher1974 Linux - Software 4 06-04-2005 10:01 PM
proftpd problems mindfestival Linux - Newbie 7 08-16-2004 07:18 AM
Problems with proftpd alitrix Linux - Software 0 12-13-2003 03:58 AM
Problems with Proftpd Inexactitude Linux - Networking 4 11-21-2003 06:12 PM
ProFTPD problems Corellon Linux - Newbie 23 06-07-2003 10:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration