{"id":231,"date":"2026-06-03T23:14:42","date_gmt":"2026-06-04T06:14:42","guid":{"rendered":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/"},"modified":"2026-06-03T23:14:42","modified_gmt":"2026-06-04T06:14:42","slug":"fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux","status":"publish","type":"post","link":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/","title":{"rendered":"Fix &#8216;Failed to Retrieve Directory Listing&#8217; FTP Error in cPanel and Linux"},"content":{"rendered":"<h2>Overview<\/h2>\n<p>The <strong>&#8220;Failed to retrieve directory listing&#8221;<\/strong> error shows up in FTP clients like FileZilla, Cyberduck, or WinSCP right after a successful login. You connect fine, credentials are accepted, and then \u2014 nothing. The directory never loads and the connection stalls or drops.<\/p>\n<p>This happens on Linux servers because FTP uses two separate channels: a control channel (port 21) for commands, and a data channel for actually transferring file listings and content. When something blocks or misconfigures that data channel \u2014 a firewall rule, a NAT layer, SELinux, or a misconfigured FTP daemon \u2014 the login works but the listing fails. The error itself is annoyingly vague and the same message can have four or five completely different root causes depending on your environment.<\/p>\n<p>This article covers cPanel\/WHM servers running <strong>Pure-FTPd<\/strong> or <strong>vsftpd<\/strong> on CentOS\/AlmaLinux\/CloudLinux, but the underlying logic applies to any Linux hosting setup. If you&#8217;re on a <a href=\"https:\/\/www.hostandtech.com\/vps-ssd-servers\">VPS SSD Hosting<\/a> plan and managing your own firewall, pay close attention to the passive port range section \u2014 that&#8217;s the most common culprit on VPS environments.<\/p>\n<h2>Prerequisites<\/h2>\n<ul>\n<li>Root SSH access to the server, or WHM access with full admin privileges<\/li>\n<li>An FTP client installed locally (FileZilla 3.x or later recommended for testing)<\/li>\n<li>Basic familiarity with the Linux command line<\/li>\n<li>Knowledge of which FTP daemon your server runs \u2014 Pure-FTPd (cPanel default) or vsftpd<\/li>\n<li>If you&#8217;re behind a corporate network or VPN, confirm you can test from a standard residential connection \u2014 some office firewalls block FTP data ports entirely<\/li>\n<\/ul>\n<h2>Step-by-Step Instructions<\/h2>\n<h3>Step 1: Switch Your FTP Client to Passive Mode<\/h3>\n<p>This fixes the problem in the majority of cases and takes 30 seconds to try. In active mode, the server initiates the data connection back to your client. Most home routers and firewalls block incoming connections, so the data channel never opens.<\/p>\n<p>In <strong>FileZilla<\/strong>:<\/p>\n<ol>\n<li>Go to <strong>Edit &gt; Settings &gt; Connection &gt; FTP<\/strong><\/li>\n<li>Set <strong>Transfer Mode<\/strong> to <strong>Passive<\/strong><\/li>\n<li>Click <strong>OK<\/strong>, disconnect, and reconnect<\/li>\n<\/ol>\n<p>If you&#8217;re connecting via an explicit FTPS or SFTP connection instead, passive mode works differently \u2014 but for standard FTP on port 21, this one change resolves it for most end users.<\/p>\n<h3>Step 2: Open the Passive Port Range in WHM Firewall (CSF)<\/h3>\n<p>Passive mode requires a range of high-numbered ports to be open on the server side. If those ports are blocked by ConfigServer Firewall (CSF) \u2014 which is the default firewall on most cPanel servers \u2014 the data channel can&#8217;t open even in passive mode.<\/p>\n<p>First, check which passive port range your FTP daemon is configured to use:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-1\"><code class=\"\" data-line=\"\"># For Pure-FTPd (cPanel default)\ngrep -i passivedports \/etc\/pure-ftpd.conf\n\n# For vsftpd\ngrep -i pasv \/etc\/vsftpd.conf<\/code><\/pre>\n<\/div>\n<p>If nothing is configured, Pure-FTPd defaults to <strong>30000\u201350000<\/strong>. Now open those ports in CSF:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-2\"><code class=\"\" data-line=\"\">vi \/etc\/csf\/csf.conf<\/code><\/pre>\n<\/div>\n<p>Find the <code class=\"\" data-line=\"\">TCP_IN<\/code> line and add the passive range:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-3\"><code class=\"\" data-line=\"\">TCP_IN = &quot;20,21,22,25,53,80,110,143,443,465,587,993,995,2077,2078,2082,2083,2086,2087,2095,2096,30000:50000&quot;<\/code><\/pre>\n<\/div>\n<p>Then restart CSF:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-4\"><code class=\"\" data-line=\"\">csf -r<\/code><\/pre>\n<\/div>\n<p>\ud83d\udcdd Note: If you&#8217;re running a tighter passive range (e.g. 49152\u201365534), configure it in <code class=\"\" data-line=\"\">\/etc\/pure-ftpd.conf<\/code> first, then match it in CSF. Don&#8217;t open a wide port range in the firewall without also locking down the daemon to that same range.<\/p>\n<h3>Step 3: Configure the Passive Port Range in Pure-FTPd<\/h3>\n<p>Even if the firewall is open, Pure-FTPd needs to know which ports it&#8217;s allowed to use for passive connections. Without this, it may try to assign ports that your firewall blocks.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-5\"><code class=\"\" data-line=\"\">echo &quot;30000 50000&quot; &gt; \/etc\/pure-ftpd\/conf\/PassivePortRange\nservice pure-ftpd restart<\/code><\/pre>\n<\/div>\n<p>For vsftpd, edit <code class=\"\" data-line=\"\">\/etc\/vsftpd.conf<\/code> directly:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-6\"><code class=\"\" data-line=\"\">pasv_min_port=30000\npasv_max_port=50000\npasv_enable=YES<\/code><\/pre>\n<\/div>\n<p>Then restart:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-7\"><code class=\"\" data-line=\"\">systemctl restart vsftpd<\/code><\/pre>\n<\/div>\n<h3>Step 4: Set the Passive IP Address (NAT \/ Cloud Environments)<\/h3>\n<p>This is the gotcha that catches most people on VPS and cloud servers. When your server is behind NAT \u2014 which is the case on most virtualised environments including many VPS setups \u2014 the FTP daemon reports its private internal IP in the PASV response. Your FTP client then tries to connect to a non-routable private address like <code class=\"\" data-line=\"\">10.x.x.x<\/code> or <code class=\"\" data-line=\"\">192.168.x.x<\/code>, which obviously fails from the outside.<\/p>\n<p>You need to force Pure-FTPd to advertise the server&#8217;s <strong>public IP<\/strong>:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-8\"><code class=\"\" data-line=\"\">echo &quot;YOUR.PUBLIC.IP.HERE&quot; &gt; \/etc\/pure-ftpd\/conf\/ForcePassiveIP\nservice pure-ftpd restart<\/code><\/pre>\n<\/div>\n<p>For vsftpd, add this to <code class=\"\" data-line=\"\">\/etc\/vsftpd.conf<\/code>:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-9\"><code class=\"\" data-line=\"\">pasv_address=YOUR.PUBLIC.IP.HERE\npasv_addr_resolve=NO<\/code><\/pre>\n<\/div>\n<p>\u26a0 Warning: If your server&#8217;s public IP changes (some VPS providers don&#8217;t assign static IPs on cheaper plans), this will break again. I&#8217;d recommend confirming you have a static IP before relying on this setting long-term.<\/p>\n<h3>Step 5: Check SELinux (AlmaLinux \/ CentOS)<\/h3>\n<p>If you&#8217;re on AlmaLinux 8\/9 or CentOS with SELinux enforcing, it can block FTP data connections silently \u2014 the daemon thinks everything is fine but SELinux denies the actual port binding.<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-10\"><code class=\"\" data-line=\"\"># Check SELinux status\ngetenforce\n\n# Check for FTP-related denials\ngrep ftp \/var\/log\/audit\/audit.log | tail -20<\/code><\/pre>\n<\/div>\n<p>If you see <code class=\"\" data-line=\"\">AVC<\/code> denials in the audit log related to FTP, enable the correct SELinux booleans:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-11\"><code class=\"\" data-line=\"\">setsebool -P ftp_home_dir on\nsetsebool -P ftpd_full_access on<\/code><\/pre>\n<\/div>\n<p>\ud83d\udcdd Note: Don&#8217;t just set SELinux to permissive mode as a permanent fix. That disables an important security layer across the entire system. Fix the specific boolean instead.<\/p>\n<h3>Step 6: Verify with a Raw FTP Session<\/h3>\n<p>If you&#8217;re still stuck, bypass your FTP client entirely and test with curl. This tells you exactly where the connection fails:<\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-12\"><code class=\"\" data-line=\"\">curl -v --ftp-pasv ftp:\/\/username:password@yourdomain.com\/<\/code><\/pre>\n<\/div>\n<p>Look at the output. If you see <code class=\"\" data-line=\"\">227 Entering Passive Mode<\/code> followed by a timeout, the port isn&#8217;t open. If you never see the 227 response, the issue is at the control channel or authentication level.<\/p>\n<h2>Common Issues &amp; Troubleshooting<\/h2>\n<h3>Connection Established but Directory Listing Hangs Indefinitely<\/h3>\n<p><strong>Cause:<\/strong> The control channel connected successfully (port 21), but the data port is being silently dropped by the firewall \u2014 not rejected, just dropped. This causes the client to wait until it times out rather than throwing an immediate error.<\/p>\n<p><strong>Fix:<\/strong> Check that your passive port range is open in both CSF\/iptables AND that the range is configured in the FTP daemon. Run <code class=\"\" data-line=\"\">csf -l | grep 30000<\/code> to confirm CSF has the rule active, not just configured.<\/p>\n<h3>Error: &#8220;ECONNREFUSED &#8211; Connection refused by server&#8221;<\/h3>\n<p><strong>Cause:<\/strong> Usually means the FTP service itself isn&#8217;t running, or it&#8217;s listening on a non-standard port.<\/p>\n<p><strong>Fix:<\/strong><\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-13\"><code class=\"\" data-line=\"\">systemctl status pure-ftpd\nnetstat -tlnp | grep :21<\/code><\/pre>\n<\/div>\n<p>If Pure-FTPd isn&#8217;t running, check <code class=\"\" data-line=\"\">\/var\/log\/messages<\/code> or <code class=\"\" data-line=\"\">journalctl -xe<\/code> for why it failed to start. A malformed config file in <code class=\"\" data-line=\"\">\/etc\/pure-ftpd\/conf\/<\/code> is a frequent cause.<\/p>\n<h3>FTP Works on Port 21 but FTPS (Port 990) Fails<\/h3>\n<p><strong>Cause:<\/strong> Implicit FTPS on port 990 requires a separate firewall rule and TLS configuration. Most cPanel setups use explicit FTPS over port 21, not implicit FTPS on 990. Your client may be configured for the wrong mode.<\/p>\n<p><strong>Fix:<\/strong> In FileZilla, set the protocol to <strong>FTP<\/strong> with <strong>Require explicit FTP over TLS<\/strong>, not <strong>FTPS<\/strong>. Also confirm port 990 is open in CSF if you genuinely need implicit FTPS.<\/p>\n<h3>Only Certain FTP Accounts Get the Error \u2014 Not All<\/h3>\n<p><strong>Cause:<\/strong> This almost always points to a chroot jail or home directory permission issue on a specific account. Pure-FTPd&#8217;s chroot can fail silently if the user&#8217;s home directory has world-writable permissions.<\/p>\n<p><strong>Fix:<\/strong><\/p>\n<div class=\"ht-code-snippet\"><button class=\"ht-code-snippet__copy\" type=\"button\" aria-label=\"Copy code\"><\/button><span class=\"ht-code-snippet__feedback\">Copied to clipboard<\/span><\/p>\n<pre class=\"ht-code-snippet__code\" id=\"code-block-14\"><code class=\"\" data-line=\"\">stat \/home\/username\nchmod 755 \/home\/username<\/code><\/pre>\n<\/div>\n<p>Pure-FTPd will refuse to chroot into a directory that&#8217;s writable by others \u2014 it&#8217;s a security measure. The directory must be owned by root or the user, with permissions <code class=\"\" data-line=\"\">755<\/code> at most.<\/p>\n<h3>Error Appears Only From Certain Networks or Locations<\/h3>\n<p><strong>Cause:<\/strong> Some ISPs, corporate networks, and VPNs block FTP data ports or intercept FTP traffic with a broken ALG (Application Layer Gateway). This is outside your server&#8217;s control.<\/p>\n<p><strong>Fix:<\/strong> Ask the affected user to test from a different network (mobile hotspot works well for this). If it works from a different connection, the problem is their network&#8217;s FTP filtering. The better long-term solution is to move those users to <strong>SFTP on port 22<\/strong>, which works through virtually every network and is more secure anyway.<\/p>\n<h2>FAQ<\/h2>\n<div class=\"ht-faq-section\">\n<h2>Frequently Asked Questions<\/h2>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Why does my FTP login succeed but the directory listing fails?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>FTP uses two separate connections \u2014 one for commands (port 21) and one for transferring data like directory listings. Your login goes through the command channel, which is open, but the data channel is blocked by a firewall, NAT issue, or passive mode misconfiguration. Switching your FTP client to passive mode and opening the passive port range on the server fixes this in most cases.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">What ports do I need to open for FTP to work on a cPanel server?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>You need port 21 open for the control connection, and a passive port range open for data transfers \u2014 typically 30000 to 50000 on cPanel servers running Pure-FTPd. Both ranges need to be open in your firewall (CSF or iptables) and configured in the FTP daemon itself. If you&#8217;re using SFTP instead, you only need port 22.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Should I use FTP or SFTP for uploading files to my hosting account?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>SFTP is the better choice for almost every situation. It runs over SSH on port 22, encrypts both credentials and file data, and works through most firewalls without the passive port headaches that standard FTP requires. All cPanel accounts support SFTP using your cPanel username and password \u2014 you don&#8217;t need to set anything up separately.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">Can a security plugin or WAF cause the &#039;failed to retrieve directory listing&#039; error?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>A WAF (Web Application Firewall) operating at the HTTP layer won&#8217;t affect FTP connections directly since they use different ports and protocols. However, firewall tools like CSF with LFD (Login Failure Daemon) can temporarily block your IP after repeated failed FTP login attempts. If you were troubleshooting and tried multiple wrong passwords, run &#8216;csf -g YOUR.IP&#8217; to check if you&#8217;ve been blocked, and &#8216;csf -ar YOUR.IP&#8217; to remove the block.<\/p>\n<\/div>\n<\/div>\n<div class=\"ht-faq-item\">\n<h3 class=\"ht-faq-question\">I set the passive port range in CSF but it still doesn&#039;t work \u2014 what am I missing?<\/h3>\n<div class=\"ht-faq-answer\">\n<p>The most common miss is that CSF was updated in the config file but not reloaded \u2014 changes to csf.conf don&#8217;t take effect until you run &#8216;csf -r&#8217;. The second common miss is a mismatch between the range configured in CSF and the range configured in the FTP daemon itself. Both need to match exactly. If you&#8217;re on a cloud VPS or a server behind NAT, you also need to set ForcePassiveIP in Pure-FTPd to your server&#8217;s public IP address.<\/p>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>The &#8216;Failed to retrieve directory listing&#8217; error is one of the most common FTP headaches on Linux hosting servers \u2014 and the official docs rarely explain why it actually happens. This guide walks you through every real cause and how to fix it, from passive mode misconfiguration to firewall port blocks.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[49],"tags":[666,669,665,667,668,671,672,670],"class_list":["post-231","post","type-post","status-publish","format-standard","hentry","category-linux","tag-cpanel-ftp","tag-filezilla","tag-ftp-error","tag-linux-web-hosting","tag-passive-mode-ftp","tag-vsftpd","tag-web-security","tag-whm-firewall"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.6 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Fix &#039;Failed to Retrieve Directory Listing&#039; FTP Error in cPanel and Linux<\/title>\n<meta name=\"description\" content=\"Fix the &#039;Failed to retrieve directory listing&#039; FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Fix &#039;Failed to Retrieve Directory Listing&#039; FTP Error in cPanel and Linux\" \/>\n<meta property=\"og:description\" content=\"Fix the &#039;Failed to retrieve directory listing&#039; FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/\" \/>\n<meta property=\"og:site_name\" content=\"Host And Tech knowledge base\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/stshostandtech\" \/>\n<meta property=\"article:published_time\" content=\"2026-06-04T06:14:42+00:00\" \/>\n<meta name=\"author\" content=\"admin\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:site\" content=\"@stshostandtech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"admin\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/\"},\"author\":{\"name\":\"admin\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\"},\"headline\":\"Fix &#8216;Failed to Retrieve Directory Listing&#8217; FTP Error in cPanel and Linux\",\"datePublished\":\"2026-06-04T06:14:42+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/\"},\"wordCount\":1621,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"keywords\":[\"cPanel FTP\",\"FileZilla\",\"FTP error\",\"Linux web hosting\",\"passive mode FTP\",\"vsftpd\",\"web security\",\"WHM firewall\"],\"articleSection\":[\"Linux Server\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/\",\"name\":\"Fix 'Failed to Retrieve Directory Listing' FTP Error in cPanel and Linux\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\"},\"datePublished\":\"2026-06-04T06:14:42+00:00\",\"description\":\"Fix the 'Failed to retrieve directory listing' FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/linux\\\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Fix &#8216;Failed to Retrieve Directory Listing&#8217; FTP Error in cPanel and Linux\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#website\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"name\":\"Host And Tech knowledge base\",\"description\":\"\",\"publisher\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#organization\",\"name\":\"Host And Tech knowledge base\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"contentUrl\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/wp-content\\\/uploads\\\/2026\\\/05\\\/logo-dark.png\",\"width\":1134,\"height\":395,\"caption\":\"Host And Tech knowledge base\"},\"image\":{\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/stshostandtech\",\"https:\\\/\\\/x.com\\\/stshostandtech\"]},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/#\\\/schema\\\/person\\\/b6fa79c48ddaba71af32e395c5b017ee\",\"name\":\"admin\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g\",\"caption\":\"admin\"},\"sameAs\":[\"https:\\\/\\\/hostandtech.com\\\/kb\"],\"url\":\"https:\\\/\\\/hostandtech.com\\\/kb\\\/author\\\/admin_fjj7qydm\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Fix 'Failed to Retrieve Directory Listing' FTP Error in cPanel and Linux","description":"Fix the 'Failed to retrieve directory listing' FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/","og_locale":"en_US","og_type":"article","og_title":"Fix 'Failed to Retrieve Directory Listing' FTP Error in cPanel and Linux","og_description":"Fix the 'Failed to retrieve directory listing' FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.","og_url":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/","og_site_name":"Host And Tech knowledge base","article_publisher":"https:\/\/www.facebook.com\/stshostandtech","article_published_time":"2026-06-04T06:14:42+00:00","author":"admin","twitter_card":"summary_large_image","twitter_creator":"@stshostandtech","twitter_site":"@stshostandtech","twitter_misc":{"Written by":"admin","Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/#article","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/"},"author":{"name":"admin","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee"},"headline":"Fix &#8216;Failed to Retrieve Directory Listing&#8217; FTP Error in cPanel and Linux","datePublished":"2026-06-04T06:14:42+00:00","mainEntityOfPage":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/"},"wordCount":1621,"commentCount":0,"publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"keywords":["cPanel FTP","FileZilla","FTP error","Linux web hosting","passive mode FTP","vsftpd","web security","WHM firewall"],"articleSection":["Linux Server"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/","url":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/","name":"Fix 'Failed to Retrieve Directory Listing' FTP Error in cPanel and Linux","isPartOf":{"@id":"https:\/\/hostandtech.com\/kb\/#website"},"datePublished":"2026-06-04T06:14:42+00:00","description":"Fix the 'Failed to retrieve directory listing' FTP error in cPanel and Linux. Step-by-step guide covering passive mode, firewall rules, and SELinux.","breadcrumb":{"@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/hostandtech.com\/kb\/linux\/fix-failed-to-retrieve-directory-listing-ftp-error-cpanel-linux\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/hostandtech.com\/kb\/"},{"@type":"ListItem","position":2,"name":"Fix &#8216;Failed to Retrieve Directory Listing&#8217; FTP Error in cPanel and Linux"}]},{"@type":"WebSite","@id":"https:\/\/hostandtech.com\/kb\/#website","url":"https:\/\/hostandtech.com\/kb\/","name":"Host And Tech knowledge base","description":"","publisher":{"@id":"https:\/\/hostandtech.com\/kb\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/hostandtech.com\/kb\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/hostandtech.com\/kb\/#organization","name":"Host And Tech knowledge base","url":"https:\/\/hostandtech.com\/kb\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/","url":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","contentUrl":"https:\/\/hostandtech.com\/kb\/wp-content\/uploads\/2026\/05\/logo-dark.png","width":1134,"height":395,"caption":"Host And Tech knowledge base"},"image":{"@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/stshostandtech","https:\/\/x.com\/stshostandtech"]},{"@type":"Person","@id":"https:\/\/hostandtech.com\/kb\/#\/schema\/person\/b6fa79c48ddaba71af32e395c5b017ee","name":"admin","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/aa1edac8bbadb442e059a5b65ad45a3b2e3ce689202373b96e3e567517ae4b39?s=96&d=mm&r=g","caption":"admin"},"sameAs":["https:\/\/hostandtech.com\/kb"],"url":"https:\/\/hostandtech.com\/kb\/author\/admin_fjj7qydm\/"}]}},"_links":{"self":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/231","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/comments?post=231"}],"version-history":[{"count":0,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/posts\/231\/revisions"}],"wp:attachment":[{"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/media?parent=231"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/categories?post=231"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hostandtech.com\/kb\/wp-json\/wp\/v2\/tags?post=231"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}