1847087 Members
5898 Online
110262 Solutions
New Discussion

ftp problem

 
Thomas Kopp
Occasional Advisor

ftp problem

Hi,

A user can log in via ftp and the command pwd is working, but when the user is using
the ls or dir command he gets following error:

421 Service not avaailable, remote server has closed connection.

That means
ftp port : 21 ( control ) is working
ftp port : 20 ( data ) is not working.

What can I do and where can I find a docu about ftp ?

Thank's
Thomas Kopp
6 REPLIES 6
Rainer_1
Honored Contributor

Re: ftp problem

Could it be that there is a firewall between the user and the system that blocks the data port 20 ?
CHRIS_ANORUO
Honored Contributor

Re: ftp problem

Check the online manual for ftp. Is user ftp setup correctly on your system?
user ftp should have the following settings:
ftp uid(500); gid(105-guest);homedir=/home/ftp;shell=/usr/bin/false.
Make directory /home/ftp/usr/bin/ permissions as 555 in FTP HOME directory. Copy cd, ls and pwd from /usr/bin into this newdirectory and make them executable only.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
Rainer_1
Honored Contributor

Re: ftp problem

Devbinder Singh Marway
Valued Contributor

Re: ftp problem

One other thing you can check is the /var/adm/inetd.sec file. Does it exist , if so is thjere an wntry in there for the server you are trying to connect to? If so as a test rename the inetd.sec file and retry your ftp.

later
Seek and you shall find
Rita C Workman
Honored Contributor

Re: ftp problem

Well, this may not apply (or maybe it will). But when I set up an FTP server for specific users, I found that if I created a bin directory under their home directory and did the following:

cp /usr/sbin/pwd /home//bin
cp /sbin/ls /home//bin

Than did a chmod 0111 /home//bin/*

Just a thought,


Thomas Kopp
Occasional Advisor

Re: ftp problem

Hi,

there are some good points, but how can I turn on
passive mode on the client?

Thomas