[SOLVED] FTP not working on my server

[SOLVED] FTP not working on my server

Postby mark9117 » Aug 28th, '16, 22:55

Sorry to bother about this. Really I am because it may have nothing to do with my end of all this.

I'm running a proftpd server on my Internet-facing box. I can use FTP just fine with Filezilla or my command-line client (Heimdal?). I can also connect to my ftp server through my domain, but I can't get a file listing with any client from that connection. Nmap shows ports 21 and my non-standard ssh ports are open. Just throwing that in there. I have not tried to get sftp implemented.

Proftpd log shows:
Code: Select all
2016-08-28 14:30:08,577 shuttle proftpd[12505] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session opened.
2016-08-28 14:30:11,449 shuttle proftpd[12505] 192.168.1.105 (192.168.1.1[192.168.1.1]): USER madams: Login successful.
2016-08-28 14:40:16,273 shuttle proftpd[12505] 192.168.1.105 (192.168.1.1[192.168.1.1]): notice: user madams: aborting transfer: Data connection closed
2016-08-28 14:40:19,220 shuttle proftpd[12505] 192.168.1.105 (192.168.1.1[192.168.1.1]): FTP session closed.


I have to manually disconnect from the server to end the connection, otherwise it tries to download a listing in perpetuity.

The cli ftp client just sits there waiting for the connection
Code: Select all
229 Entering Extended Passive Mode (|||55087|)
150 Opening ASCII mode data connection for file list


Filezilla times out

Code: Select all
Status:   Resolving address of adams-lan.org
Status:   Connecting to 64.130.94.10:21...
Status:   Connection established, waiting for welcome message...
Status:   Insecure server, it does not support FTP over TLS.
Status:   Logged in
Status:   Retrieving directory listing...
C
Command:   PWD
Response:   257 "/home/madams" is the current directory
Command:   TYPE I
Response:   200 Type set to I
Command:   PASV
Response:   227 Entering Passive Mode (64,130,94,10,198,108).
Command:   LIST
Response:   150 Opening BINARY mode data connection for file list
Error:   Connection timed out after 15 seconds of inactivity
Error:   Failed to retrieve directory listing


Proftpd.conf can be seen here - [url]http://pastebin.com/sn4MnRHf[/url] (subsequently expired)

I would appreciate any wisdom there may be out there.

Thank you.

Mark
Last edited by mark9117 on Dec 22nd, '16, 12:57, edited 3 times in total.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.

Re: FTP not working on my server

Postby petedan10 » Sep 1st, '16, 04:44

I can think of a few possible things to check.

Have you set a proper parent directory?
Is the file system healthy?
Is the hard disk healthy without failing bad sectors?
petedan10
 
Posts: 69
Joined: Jun 27th, '15, 10:23

Re: FTP not working on my server

Postby wintpe » Sep 22nd, '16, 16:45

more likely down to passive verses active mode.

ftp uses two ports, and that second port needs to be open for data, in the default active mode.

grep ftp /etc/services
ftp-data 20/tcp
ftp 21/tcp


if you are just allowing access through a firewall, and have only allowed port 21 then this is where the problem might lie.

there are several articles about configuring proftp through a firewall, including setting aside a range of ports
to accept the data connection.

http://www.proftpd.org/docs/howto/NAT.html

for example.

i remember that when i did offer a ftp connection to the outside world it took me ages to work this stuff out, but i retired that box years ago now, and
do things differently.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK

Re: FTP not working on my server

Postby jasonberlin » Nov 13th, '16, 05:55

Even though most people at this time use this particular IP address as a default one, there are several additional wireless router brand names which use other Router IP addresses..

If your wireless router has DHCP features, then your connected pc will be able to obtain an Default IP address through the router completely on its own. Just be certain the default router IP address and the Default gateway are the very same.

Useful article :

https://forum.filezilla-project.org/viewtopic.php?t=30751
http://www.192168ll.net/
jasonberlin
 
Posts: 1
Joined: Nov 13th, '16, 05:53

Re: FTP not working on my server

Postby mark9117 » Dec 22nd, '16, 12:52

Fixed it.

Found this line in /etc/ssh/sshd_config:

Code: Select all
# override default of no subsystems
#Subsystem      sftp    /usr/lib/ssh/sftp-server
Subsystem   sftp    /usr/bin/sftp


Changed it to this:
Code: Select all
# override default of no subsystems
#Subsystem      sftp    /usr/lib/ssh/sftp-server
############Subsystem   sftp    /usr/bin/sftp
Subsystem       sftp    internal-sftp


Not entirely sure why that worked, but stumbled onto it here: https://www.digitalocean.com/community/ ... ftp-server

Marking it solved.
Let's just reboot everything all the time.
User avatar
mark9117
 
Posts: 395
Joined: Sep 12th, '11, 20:32
Location: Eastern New Mexico -- Not Hell, but you can see it from here.


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron