Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Valued Contributor III
672 Views

A new problem when uses the ftp service by inetd

<<<<My English is not good, please forgives.>>>> 

 

When a ftp user will connect the server, inetd then 

starts a ftpd process, but when the ftp user will disconnect, 

the ftpd process did not end. 

 

=============================================================# ps 

PID PORT STAT SIZE SHARED %CPU COMMAND 

...... 

23 S 139K 0K 0.0 /bin/dhcpcd -NRY 

24 S 95K 0K 0.0 /bin/inetd 

25 S 279K 0K 0.0 /bin/boa -c /mnt/cf/httpd/ 

26 S 195K 0K 0.0 /bin/sh 

30 S 287K 0K 0.0 /bin/ftpd 

34 S 287K 0K 0.0 /bin/ftpd 

41 S 287K 0K 0.0 /bin/ftpd 

47 R 83K 0K 0.0 ps 

============================================================== 

now there is 3 ftpd process, but in fact was i has connected thrice , not three users connects. 

 

why?? 

 

<<<<My English is not good, please forgives.>>>> 

thx.
0 Kudos
2 Replies
Highlighted
Valued Contributor III
2 Views

Re: A new problem when uses the ftp service by inetd

You&#39;re right, at the end of the main function, the ftp server goes into an infinite loop looking for commands to parse but it doesn&#39;t check for a closed socket. 

 

As quirky as it sounds, you need to send a "quit" command at the end of your session in order for the ftp server to shut down.
0 Kudos
Highlighted
Valued Contributor III
2 Views

Re: A new problem when uses the ftp service by inetd

thx for your reply, 

But i cannot guarantee each people all send "quit" at the end of the session. 

 

After I modify the code ( i add a "exit(0);" in the ftpcmd.c after send "bye" to client), 

using the FlashFXP software not to have the question,  

but using the IE not to be good. 

 

I cant qualify the user to use a software to link the ftp service.
0 Kudos