{"id":2792,"date":"2024-02-23T11:30:39","date_gmt":"2024-02-23T06:00:39","guid":{"rendered":"https:\/\/www.veeble.org\/kb\/?p=2792"},"modified":"2025-04-11T11:45:21","modified_gmt":"2025-04-11T06:15:21","slug":"how-to-install-and-configure-vsftpd-on-ubuntu","status":"publish","type":"post","link":"https:\/\/www.veeble.com\/kb\/how-to-install-and-configure-vsftpd-on-ubuntu\/","title":{"rendered":"How to Install and Configure VSFTPD on Ubuntu"},"content":{"rendered":"\n<figure class=\"wp-block-image aligncenter size-large is-resized\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"537\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-1024x537.png\" alt=\"How to Install and Configure VSFTPD on Ubuntu\" class=\"wp-image-2808\" style=\"width:752px;height:auto\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-1024x537.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-300x157.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-768x402.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu.png 1080w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Setting up an <a href=\"https:\/\/en.wikipedia.org\/wiki\/File_Transfer_Protocol\" target=\"_blank\" rel=\"noopener\">FTP <\/a>(File Transfer Protocol) server is a common requirement for businesses and individuals who need a reliable method for transferring files over a network. The Very Secure FTP Daemon (VSFTPD ) is one of the most popular and secure FTP servers available on Linux. It offers a robust and efficient solution for hosting an FTP server, with a strong focus on security features. vsftpd supports both IPv4 and IPv6 and provides options for secure data transmission, including <a href=\"https:\/\/www.f5.com\/glossary\/ssl-tls-encryption\" target=\"_blank\" rel=\"noopener\">SSL\/TLS encryption<\/a>.<\/p>\n\n\n\n<p>As a server administrator, I&#8217;ve navigated through numerous challenges and explored various solutions in my quest to establish a secure and efficient file transfer system. My journey led me to VSFTPD (Very Secure FTP Daemon), a choice that stands out for its robust security features and remarkable performance. Here, I share step by step guide of installing and configuring VSFTPD on an Ubuntu server.<\/p>\n\n\n<h4 class=\"wp-block-heading\" id=\"prerequisites\">Prerequisites<\/h4>\n\n\n<ul class=\"wp-block-list\">\n<li>An Ubuntu server<\/li>\n\n\n\n<li>Root access or a user with sudo privileges<\/li>\n\n\n\n<li>Basic familiarity with the command line interface<\/li>\n<\/ul>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-1-installing-vsftpd\">Step 1: Installing VSFTPD<\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Update the <a href=\"https:\/\/packages.ubuntu.com\/\" target=\"_blank\" rel=\"noopener\">Ubuntu  Package Lists<\/a><\/strong>: First, make sure your package lists are up to date.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt update<\/code><\/pre>\n\n\n\n<p>      2. <strong>Install VSFTPD<\/strong>: Use the <a href=\"https:\/\/ubuntu.com\/server\/docs\/package-management\" target=\"_blank\" rel=\"noopener\">apt package manager<\/a> to install VSFTPD.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# apt install vsftpd -y<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100720.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"936\" height=\"385\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100720.png\" alt=\"install vsftpd\" class=\"wp-image-2793\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100720.png 936w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100720-300x123.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100720-768x316.png 768w\" sizes=\"auto, (max-width: 936px) 100vw, 936px\" \/><\/a><\/figure>\n\n\n\n<p><strong>      3. Start and Enable the VSFTPD Service<\/strong>: Ensure the service starts automatically upon   system boot.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# systemctl start vsftpd\nroot@ervintest:~# systemctl enable vsftpd<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-5.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"918\" height=\"116\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-5.png\" alt=\"VSFTPD Service\" class=\"wp-image-2794\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-5.png 918w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-5-300x38.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-5-768x97.png 768w\" sizes=\"auto, (max-width: 918px) 100vw, 918px\" \/><\/a><\/figure>\n\n\n\n<p>     4. <strong>Check the Service Status<\/strong>: Verify that the service is running smoothly.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-2-configuring-vsftpd\">Step 2: Configuring VSFTPD<\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Backup the Original Configuration File<\/strong>: It&#8217;s a good practice to back up the original configuration file before making changes<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# cp \/etc\/vsftpd.conf \/etc\/vsftpd.conf.backup\n<\/code><\/pre>\n\n\n\n<p>      2. <strong>Editing the Configuration File<\/strong>: <\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Open the configuration file in your preferred text editor.<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# nano \/etc\/vsftpd.conf<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-7.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"929\" height=\"770\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-7.png\" alt=\"vsftpd.conf\" class=\"wp-image-2797\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-7.png 929w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-7-300x249.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-7-768x637.png 768w\" sizes=\"auto, (max-width: 929px) 100vw, 929px\" \/><\/a><\/figure>\n\n\n\n<p>         2.  Modify or ensure these lines are set as follows to enhance security and functionality:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>listen=NO<br>listen_ipv6=YES<br>anonymous_enable=NO<br>local_enable=YES<br>write_enable=YES<br>chroot_local_user=YES<br>allow_writeable_chroot=YES<br>pasv_min_port=10000<br>pasv_max_port=10100<br>user_sub_token=$USER<br>local_root=\/home\/$USER\/ftp<\/code><\/pre>\n\n\n\n<p>Adjust the passive port range (<code>pasv_min_port<\/code> and <code>pasv_max_port<\/code>) according to your needs and firewall settings.<\/p>\n\n\n\n<p>3. Save the changes and exit the editor. In <code>nano<\/code>, you can do this by pressing <code>CTRL + X<\/code>, then <code>Y<\/code> and <code>Enter<\/code>.<\/p>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-3-create-an-ftp-user\">Step 3: Create an FTP User<\/h2>\n\n\n<ol class=\"wp-block-list\">\n<li>Create an FTP user and set a password:<\/li>\n<\/ol>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# adduser ftpuser<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100739.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"803\" height=\"373\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100739.png\" alt=\"ftpuser\" class=\"wp-image-2795\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100739.png 803w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100739-300x139.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Screenshot-2024-02-23-100739-768x357.png 768w\" sizes=\"auto, (max-width: 803px) 100vw, 803px\" \/><\/a><\/figure>\n\n\n\n<p>   2. Create a directory for FTP access and set permissions:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# mkdir -p \/home\/ftpuser\/ftp\nroot@ervintest:~# chown nobody:nogroup \/home\/ftpuser\/ftp\nroot@ervintest:~# chmod a-w \/home\/ftpuser\/ftp\nroot@ervintest:~# mkdir \/home\/ftpuser\/ftp\/files\nroot@ervintest:~#  chown ftpuser:ftpuser \/home\/ftpuser\/ftp\/files<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-6.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"886\" height=\"115\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-6.png\" alt=\"ftp access\" class=\"wp-image-2796\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-6.png 886w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-6-300x39.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-6-768x100.png 768w\" sizes=\"auto, (max-width: 886px) 100vw, 886px\" \/><\/a><\/figure>\n\n\n<h3 class=\"wp-block-heading\" id=\"step-4-restart-vsftpd\">Step 4: Restart vsftpd<\/h3>\n\n\n<p>For the changes to take effect, restart the <code>vsftpd<\/code> service:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>root@ervintest:~# systemctl restart vsftpd<\/code><\/pre>\n\n\n<h2 class=\"wp-block-heading\" id=\"step-8-test-the-ftp-connection\">Step 8: Test the FTP Connection<\/h2>\n\n\n<p>Test your FTP server connection using an FTP client like FileZilla . Enter the password, username, and IP address of your server. You should be able to login to your server and move files if everything is configured properly. To know more about Filezilla FTP client configuration, visit <a href=\"https:\/\/www.veeble.org\/kb\/configuring-filezilla\/\" target=\"_blank\" rel=\"noopener\">https:\/\/www.veeble.org\/kb\/configuring-filezilla\/<\/a> . <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-8.png\" target=\"_blank\" rel=\"noopener\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"663\" src=\"https:\/\/www.veeble.org\/kb\/wp-content\/uploads\/2024\/02\/image-8-1024x663.png\" alt=\"filexilla\" class=\"wp-image-2798\" srcset=\"https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-8-1024x663.png 1024w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-8-300x194.png 300w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-8-768x498.png 768w, https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/image-8.png 1173w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<div style=\"height:45px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<div class=\"wp-block-uagb-call-to-action uagb-block-ed59146e wp-block-button\"><div class=\"uagb-cta__wrap\"><h3 class=\"uagb-cta__title\">Managed VPS Hosting, Simplified.<\/h3><p class=\"uagb-cta__desc\">Veeble offers fully managed VPS solutions for seamless performance and peace of mind. Focus on your business, we&#8217;ll handle the rest.<\/p><\/div><div class=\"uagb-cta__buttons\"><a href=\"https:\/\/www.veeble.com\/in\/managed-vps\/\" class=\"uagb-cta__button-link-wrapper wp-block-button__link\" target=\"_blank\" rel=\"noopener noreferrer\">Explore Plans<svg xmlns=\"https:\/\/www.w3.org\/2000\/svg\" viewBox=\"0 0 512 512\"><path d=\"M504.3 273.6l-112.1 104c-6.992 6.484-17.18 8.218-25.94 4.406c-8.758-3.812-14.42-12.45-14.42-21.1L351.9 288H32C14.33 288 .0002 273.7 .0002 255.1S14.33 224 32 224h319.9l0-72c0-9.547 5.66-18.19 14.42-22c8.754-3.809 18.95-2.075 25.94 4.41l112.1 104C514.6 247.9 514.6 264.1 504.3 273.6z\"><\/path><\/svg><\/a><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Setting up an FTP (File Transfer Protocol) server is a common requirement for businesses and individuals who need a reliable method for transferring files [&hellip;]<\/p>\n","protected":false},"author":9,"featured_media":2808,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","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":"","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":"set","ast-page-background-enabled":"default","ast-page-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":"","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-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":"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":""},"mobile":{"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":""}},"footnotes":""},"categories":[8],"tags":[],"class_list":["post-2792","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ftp"],"uagb_featured_image_src":{"full":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu.png",1080,566,false],"thumbnail":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-150x150.png",150,150,true],"medium":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-300x157.png",300,157,true],"medium_large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-768x402.png",768,402,true],"large":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu-1024x537.png",1024,537,true],"1536x1536":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu.png",1080,566,false],"2048x2048":["https:\/\/www.veeble.com\/kb\/wp-content\/uploads\/2024\/02\/Effortlessly-Install-and-Configure-VSFTPD-on-Ubuntu.png",1080,566,false]},"uagb_author_info":{"display_name":"Nayana Nair","author_link":"https:\/\/www.veeble.com\/kb\/author\/nayana\/"},"uagb_comment_info":0,"uagb_excerpt":"Setting up an FTP (File Transfer Protocol) server is a common requirement for businesses and individuals who need a reliable method for transferring files [&hellip;]","_links":{"self":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2792","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/users\/9"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/comments?post=2792"}],"version-history":[{"count":10,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2792\/revisions"}],"predecessor-version":[{"id":8576,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/posts\/2792\/revisions\/8576"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media\/2808"}],"wp:attachment":[{"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/media?parent=2792"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/categories?post=2792"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veeble.com\/kb\/wp-json\/wp\/v2\/tags?post=2792"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}