Ftp Problems

I am having problems with FTP. When I try to ftp to the machine it seems like it wants to connect and the immediately I am disconnected. I have tried turning the firewall off as well and same thing. I get in and immediately it disconnects the session. Any help would be great. Thanks.

We can’t help You as you provided not enough information.
How do You connect?
Where is the ftp server?
Version of software you’re using to connect to ftp?

Give as as much information as possible.

Sorry about that.

I use filezilla or windows to ftp to our webserver. It acts as though it connects and then immediatley disconnects.

We are running Opensuse 11.1

Well, you could try connecting with ftp.
I assume you know the login and the password :)??

You need to check if it’s a problem with the software or the server so the first thing is to do in the command (you may have to install it):

ftp <server address>

You should see after that any messages if there is something wrong.

Filezilla is a FTP client, for people not aware of it.

Do you actually have a FTP server running on opensuse 11.1? Did you set one up? Or did you think it would just be there? It doesn’t get installed automatically. Perhaps you really wanted SFTP which will work if you have ssh login access to the machine and the admin has not disabled the SFTP subsystem. You have to specify SFTP in filezilla, it’s also a SFTP client.

SFTP is not related to FTP by the way, just that they are both file transfer protocols, that’s all.

It is nice you call it a webserver, but beside of having that functionality it should also be an ftpserver. Which ftpserver software did you start (and how)?

What do you get with

netstat -ap | grep ftp    

0 0 *:ftp . LISTEN 3615/xinetd

Correct. That means that you have configured a program in xinetd.d. Maybe pure-ftp (maybe another one). And xinetd is LISTENING.

Goto /etc/xinetd.d and look for a file which has ftp in its name. Post the contents here. It may contain security restrictions you are not aware of.

I have two
ftp_psa
service ftp
{
socket_type = stream
protocol = tcp
wait = no
user = root
server = /usr/sbin/in.proftpd
server_args = -c /etc/proftpd.conf
instances = UNLIMITED
}

and

pure-ftpd

default: off

description: The ftpd server serves FTP connections. It uses normal, \

unencrypted usernames and passwords for authentication. This ftpd is \

the pure-ftpd.

** NOTE ** when using pure-ftpd from xinetd the arguments to control

it’s behaviour should be added here in this file in the

“server_args” line since the configuration file

/etc/pure-ftpd.conf is only for standalone pure-ftpd.

The command “/usr/sbin/pure-config-args /etc/pure-ftpd.conf”

will print the arguments needed for behaviour like standalone

pure-ftpd.

service ftp
{

server_args =

socket_type     = stream
protocol        = tcp
wait            = no
user            = root
server          = /usr/sbin/pure-ftpd

}

Hm, none of them has an explicit

disable = yes/no

so whichever is used? I can not find a default for this value in

man xinetd.conf

I had another question: What did you do to start it (ftp does not run by dfault as ken_yap already explained)?.

When the default for disable is yes, both will be configured which is not really possible. When the default is no, there would not be an ftp service, but there is.

You could try to add *disable *statements to both, one with *yes *and the other with *no. *Find out what xinetd’'s PID is with

ps -ef | grep xinetd

(make no mistakes here) and (as root) do:

kill -HUP <pid-of-xinetd>

This will force xinetd to reread its configuration. Then first check with

netstat -ap | grep ftp

if xinetd is still listening. Then try your ftp client.

Change *yes *and *no *and do it all again for checking the other server-program.

This is what I see.

root 3615 1 0 Jun30 ? 00:00:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.init.pid
root 26219 24931 0 12:58 ? 00:00:01 /usr/bin/kwrite /etc/xinetd.d/ftp_psa
root 29721 25032 0 14:09 pts/7 00:00:00 grep xinetd

xinetd’s PID is 3615. This was also revealed by the netstat command we used earlier.

The second line is you still using the kwrite editor on the config.

And the third is the grep cmand you are using to see al this beautifull things.

(BTW, if you surround these sort of listings with CODE tags, by selecting the piece of text and then clicking on the # in the button list above where you input the text, you will see it as it is on the system, like mine:

root      3872     1  0 19:21 ?        00:00:00 /usr/sbin/xinetd
root      5590  5563  0 20:31 pts/1    00:00:00 grep xinetd

Much easier to interprete).

Tried that and still the same thing. The ftp was setup and working. Then we had to reboot server and now it is not working. Thanks for all the help. I am new to Suse and a Windows guy but trying to learn under fire here.

But then somebody has to know (or better written down) what he did to get it working!

That has nothing to do with the type of OS, but just with good system management.