{"id":2045,"date":"2017-09-24T17:46:21","date_gmt":"2017-09-24T12:16:21","guid":{"rendered":"https:\/\/pheonixsolutions.com\/blog\/?p=2045"},"modified":"2026-09-08T11:25:10","modified_gmt":"2026-09-08T05:55:10","slug":"pureftp-configuration-issue-cpanelfailed-retrieve-directory-listing","status":"publish","type":"post","link":"https:\/\/pheonixsolutions.com\/blog\/pureftp-configuration-issue-cpanelfailed-retrieve-directory-listing\/","title":{"rendered":"Pureftp configuration issue on cpanel|Failed to retrieve directory listing"},"content":{"rendered":"<h2>Introduction<\/h2>\n<p class=\"isSelectedEnd\">When connecting to a cPanel server using FileZilla or another FTP client, you may encounter the error:<\/p>\n<p class=\"isSelectedEnd\">Failed to retrieve directory listing<\/p>\n<p class=\"isSelectedEnd\">In many cases, this issue occurs when the server is configured behind a NAT environment and the <strong>ForcePassiveIP<\/strong> value in the Pure-FTPd configuration is incorrect. Since FTP passive mode relies on the correct public IP address, an invalid setting can prevent directory listings from loading successfully.<\/p>\n<p class=\"isSelectedEnd\">This article explains how to identify and fix the issue and make the configuration persistent across future cPanel updates.<\/p>\n<h2>Cause<\/h2>\n<p class=\"isSelectedEnd\">The Pure-FTPd service uses the <strong>ForcePassiveIP<\/strong> directive to advertise the server&#8217;s public IP address during passive FTP connections.<\/p>\n<p class=\"isSelectedEnd\">If:<\/p>\n<ul data-spread=\"false\">\n<li>The server is behind NAT.<\/li>\n<li>The public IP address has changed.<\/li>\n<li>The ForcePassiveIP value is incorrect.<\/li>\n<\/ul>\n<p class=\"isSelectedEnd\">FTP clients may connect successfully but fail when attempting to retrieve directory listings.<\/p>\n<h2>Temporary Fix<\/h2>\n<p class=\"isSelectedEnd\">Edit the Pure-FTPd configuration file:<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">vi \/etc\/pure-ftpd.conf<\/code><\/pre>\n<p class=\"isSelectedEnd\">Locate and update:<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">ForcePassiveIP xx.xx.xx.xx<\/code><\/pre>\n<p class=\"isSelectedEnd\">Replace <code dir=\"ltr\">xx.xx.xx.xx<\/code> with the correct public IP address.<\/p>\n<p class=\"isSelectedEnd\">Restart the Pure-FTPd service:<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">systemctl restart pure-ftpd<\/code><\/pre>\n<p class=\"isSelectedEnd\">Test the FTP connection again using FileZilla.<\/p>\n<h2>Permanent Fix<\/h2>\n<p class=\"isSelectedEnd\">The configuration in <code dir=\"ltr\">\/etc\/pure-ftpd.conf<\/code> may be overwritten during cPanel updates.<\/p>\n<p class=\"isSelectedEnd\">To make the change persistent, update the cPanel-managed configuration file:<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">vi \/var\/cpanel\/conf\/pureftpd\/main<\/code><\/pre>\n<p class=\"isSelectedEnd\">Set the correct public IP:<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">ForcePassiveIP: xx.xx.xx.xx<\/code><\/pre>\n<p class=\"isSelectedEnd\">Save the file and rebuild the configuration if required, then restart the Pure-FTPd service.<\/p>\n<pre dir=\"ltr\"><code dir=\"ltr\">systemctl restart pure-ftpd<\/code><\/pre>\n<h2>Verification<\/h2>\n<p class=\"isSelectedEnd\">After updating the configuration:<\/p>\n<ol start=\"1\" data-spread=\"false\">\n<li>Connect using FileZilla.<\/li>\n<li>Enable Passive Mode in the FTP client.<\/li>\n<li>Browse directories and upload\/download a test file.<\/li>\n<li>Confirm that the &#8220;Failed to retrieve directory listing&#8221; error no longer appears.<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p class=\"isSelectedEnd\">The &#8220;Failed to retrieve directory listing&#8221; error in Pure-FTPd is commonly caused by an incorrect <strong>ForcePassiveIP<\/strong> configuration, especially on servers operating behind NAT. Updating the correct public IP address and making the change in the cPanel-managed configuration ensures that FTP connections continue to work even after future cPanel upgrades.<\/p>\n<h2>Frequently Asked Questions<\/h2>\n<p><strong>1. Why does FileZilla show &#8220;Failed to retrieve directory listing&#8221;?<\/strong><\/p>\n<p class=\"isSelectedEnd\">This typically occurs when Passive FTP mode cannot establish a data connection due to an incorrect ForcePassiveIP setting, firewall restrictions, or NAT-related networking issues.<\/p>\n<p><strong>2. Will cPanel updates overwrite Pure-FTPd configuration changes?<\/strong><\/p>\n<p class=\"isSelectedEnd\">Yes. Direct modifications to <code dir=\"ltr\">\/etc\/pure-ftpd.conf<\/code> can be overwritten during cPanel updates. Use <code dir=\"ltr\">\/var\/cpanel\/conf\/pureftpd\/main<\/code> for persistent configuration changes.<\/p>\n<p><strong>3. How can I verify the correct ForcePassiveIP value?<\/strong><\/p>\n<p class=\"isSelectedEnd\">Use the server&#8217;s public IP address that FTP clients use to connect. If the server is behind NAT, configure the externally accessible public IP rather than the private internal address.<\/p>\n<h2>Related Articles<\/h2>\n<ul data-spread=\"false\">\n<li><a href=\"https:\/\/pheonixsolutions.com\/blog\/install-mod-evasive-module-cpaneleasy-apache-4\/\">Install mod_evasive Module in EasyApache 4 on cPanel<\/a><\/li>\n<li><a href=\"https:\/\/pheonixsolutions.com\/blog\/configure-multiple-php-litespeed-cpanel-server\/\">Configure Multiple PHP Versions with LiteSpeed on cPanel<\/a><\/li>\n<li><a href=\"https:\/\/pheonixsolutions.com\/blog\/modify-virtualhost-single-domain-cpanelapache-2-4\/\">Modify VirtualHost for a Single Domain in Apache 2.4 on cPanel<\/a><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2 id=\"talk-to-our-experts\" class=\"wp-block-heading\" tabindex=\"-1\">Talk to our experts<\/h2>\n<p class=\"wp-block-paragraph\">Looking for the right technology solution for your business? Our team of experts can help you with development, cloud, DevOps, design, and a wide range of other technology needs. Get in touch with our team\u00a0<a href=\"https:\/\/pheonixsolutions.com\/contact\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Introduction When connecting to a cPanel server using FileZilla or another FTP client, you may encounter the error: Failed to [&hellip;]<\/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":""}},"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[1019],"tags":[263,183,380],"class_list":["post-2045","post","type-post","status-publish","format-standard","hentry","category-cloud-aws","tag-cpanel","tag-filezilla","tag-pure-ftpd","psol-cat-cloud-aws"],"jetpack_publicize_connections":[],"jetpack_shortlink":"https:\/\/wp.me\/phn2x7-wZ","jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2045","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/comments?post=2045"}],"version-history":[{"count":1,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2045\/revisions"}],"predecessor-version":[{"id":11502,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/posts\/2045\/revisions\/11502"}],"wp:attachment":[{"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/media?parent=2045"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/categories?post=2045"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/pheonixsolutions.com\/blog\/wp-json\/wp\/v2\/tags?post=2045"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}