{"id":918,"date":"2012-11-19T04:19:29","date_gmt":"2012-11-19T10:19:29","guid":{"rendered":"http:\/\/blog.supportpro.com\/?p=918"},"modified":"2026-03-26T04:19:36","modified_gmt":"2026-03-26T10:19:36","slug":"ftp-connection-issues-can-connect-via-console-but-not-with-filezila","status":"publish","type":"post","link":"https:\/\/www.supportpro.com\/blog\/ftp-connection-issues-can-connect-via-console-but-not-with-filezila\/","title":{"rendered":"Ftp Connection issues (Can connect via console , but not with filezila )"},"content":{"rendered":"\n<p>Sometimes administrators may encounter an FTP connection issue where login works through the console, but FTP clients such as <strong>FileZilla<\/strong> fail to connect properly.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Issue<\/h2>\n\n\n\n<p>You can successfully connect to the FTP server using the command line, but when connecting through an FTP client like FileZilla:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The connection hangs at the <strong>MLSD command<\/strong><\/li>\n\n\n\n<li>Directory listing fails<\/li>\n\n\n\n<li>Connection eventually times out<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Cause<\/h2>\n\n\n\n<p>This issue usually occurs when the FTP server operates in <strong>Passive Mode<\/strong>.<\/p>\n\n\n\n<p>In passive mode:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>The FTP client connects to <strong>port 21<\/strong> for authentication.<\/li>\n\n\n\n<li>The server then opens a <strong>random high port<\/strong> (typically above 30000) for data transfer.<\/li>\n\n\n\n<li>If these passive ports are blocked by the firewall, directory listing and file transfers will fail.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Solution<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: Login to the FTP Server<\/h3>\n\n\n\n<p>Access your server via SSH.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: Configure Passive Port Range<\/h3>\n\n\n\n<p>Open the Pure-FTPd configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/pure-ftpd.conf<\/code><\/pre>\n\n\n\n<p>Locate the following line:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">PassivePortRange 30000 35000<\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Ensure the line exists.<\/li>\n\n\n\n<li>Make sure it is <strong>not commented out<\/strong>.<\/li>\n<\/ul>\n\n\n\n<p>Save the file after confirming the configuration.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: Allow Passive Ports in CSF Firewall<\/h3>\n\n\n\n<p>Edit the CSF configuration file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>vi \/etc\/csf\/csf.conf<\/code><\/pre>\n\n\n\n<p>Find the <strong>TCP_IN<\/strong> rule and modify it as follows:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>TCP_IN = \"20,21,22,25,53,80,110,30000:35000\"<\/code><\/pre>\n\n\n\n<p>This allows incoming connections for FTP passive data ports.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: Restart CSF Firewall<\/h3>\n\n\n\n<p>After saving changes, restart CSF:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>csf -r<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">Result<\/h2>\n\n\n\n<p>Once the passive port range is properly configured and allowed in CSF:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>FTP clients like FileZilla will connect successfully.<\/li>\n\n\n\n<li>MLSD timeout errors will be resolved.<\/li>\n\n\n\n<li>Directory listing and file transfers will work normally.<\/li>\n<\/ul>\n\n\n\n<p>If you require help, <a href=\"https:\/\/www.supportpro.com\/requestquote.php\">contact SupportPRO Server Admin<\/a><span id=\"hs-cta-wrapper-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-wrapper\"><span id=\"hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\" class=\"hs-cta-node hs-cta-9d590242-d641-4383-94b4-8cfd62f0af6b\"><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/9d590242-d641-4383-94b4-8cfd62f0af6b\"><\/a><\/span><\/span><\/p>\n\n\n\n<div class=\"wp-block-media-text alignwide has-media-on-the-right is-stacked-on-mobile is-vertically-aligned-center has-white-background-color has-background\"><div class=\"wp-block-media-text__content\">\n<p class=\"has-large-font-size\">Facing issues? <\/p>\n\n\n\n<p class=\"has-large-font-size\">Our technical support<br>engineers can solve it. <\/p>\n\n\n\n<!--HubSpot Call-to-Action Code --><span class=\"hs-cta-wrapper\" id=\"hs-cta-wrapper-3350a795-db50-482f-9911-301930d1b1be\"><span class=\"hs-cta-node hs-cta-3350a795-db50-482f-9911-301930d1b1be\" id=\"hs-cta-3350a795-db50-482f-9911-301930d1b1be\"><!--[if lte IE 8]><div id=\"hs-cta-ie-element\"><\/div><![endif]--><a href=\"https:\/\/cta-redirect.hubspot.com\/cta\/redirect\/2725694\/3350a795-db50-482f-9911-301930d1b1be\" ><img decoding=\"async\" class=\"hs-cta-img\" id=\"hs-cta-img-3350a795-db50-482f-9911-301930d1b1be\" style=\"border-width:0px;\" src=\"https:\/\/no-cache.hubspot.com\/cta\/default\/2725694\/3350a795-db50-482f-9911-301930d1b1be.png\"  alt=\"Contact Us today!\"\/><\/a><\/span><script charset=\"utf-8\" src=\"https:\/\/js.hscta.net\/cta\/current.js\"><\/script><script type=\"text\/javascript\"> hbspt.cta.load(2725694, '3350a795-db50-482f-9911-301930d1b1be', {\"useNewLoader\":\"true\",\"region\":\"na1\"}); <\/script><\/span><!-- end HubSpot Call-to-Action Code -->\n<\/div><figure class=\"wp-block-media-text__media\"><img fetchpriority=\"high\" decoding=\"async\" width=\"904\" height=\"931\" src=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png\" alt=\"guy server checkup\" class=\"wp-image-12943 size-full\" srcset=\"https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup.png 904w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-291x300.png 291w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-768x791.png 768w, https:\/\/www.supportpro.com\/blog\/wp-content\/uploads\/2022\/09\/Free-server-checkup-585x602.png 585w\" sizes=\"(max-width: 904px) 100vw, 904px\" \/><\/figure><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Sometimes administrators may encounter an FTP connection issue where login works through the console, but FTP clients such as FileZilla fail to connect properly. Issue You can successfully connect to&hellip;<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[1,3],"tags":[],"class_list":["post-918","post","type-post","status-publish","format-standard","hentry","category-miscellaneous","category-technical-articles"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/918","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/comments?post=918"}],"version-history":[{"count":6,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions"}],"predecessor-version":[{"id":16651,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/posts\/918\/revisions\/16651"}],"wp:attachment":[{"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/media?parent=918"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/categories?post=918"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.supportpro.com\/blog\/wp-json\/wp\/v2\/tags?post=918"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}