{"id":5173,"date":"2014-06-24T00:33:43","date_gmt":"2014-06-23T16:33:43","guid":{"rendered":"https:\/\/webhostinggeeks.com\/howto\/?p=5173"},"modified":"2023-06-26T18:11:55","modified_gmt":"2023-06-26T18:11:55","slug":"how-to-install-and-configure-vsftpd-ftp-server-on-ubuntu-14-04","status":"publish","type":"post","link":"https:\/\/webhostinggeeks.com\/howto\/how-to-install-and-configure-vsftpd-ftp-server-on-ubuntu-14-04\/","title":{"rendered":"How to Install and Configure vsftpd FTP Server on Ubuntu 14.04"},"content":{"rendered":"<p>The File Transfer Protocol (FTP) is a universally accepted network protocol utilized for the transfer of files from one machine to another, or to a server. If you&#8217;re managing your own Virtual Private Server (VPS) or dedicated server to host your blog or website, it&#8217;s advisable to install an FTP service. This will simplify the process of uploading and retrieving any files to the VPS server.<\/p>\n<p>This guide will walk you through the steps to install and configure the vsftpd FTP Server on Ubuntu 14.04.<\/p>\n<h2>Step 1: Installing vsftpd FTP Service<\/h2>\n<p>To begin, you need to install the vsftpd FTP service. This can be done by running the following command:<\/p>\n<pre>\r\nsudo apt-get install vsftpd -y\r\n<\/pre>\n<h2>Step 2: Configuring vsftpd<\/h2>\n<p>Next, you need to open the vsftpd configuration file and uncomment certain lines. This can be done by running the following command:<\/p>\n<pre>\r\nsudo vi \/etc\/vsftpd.conf\r\n<\/pre>\n<p>You need to uncomment the following lines and add the last two lines:<\/p>\n<pre>\r\nwrite_enable=YES\r\nascii_upload_enable=YES\r\nascii_download_enable=YES\r\nchroot_local_user=YES\r\nchroot_list_enable=YES\r\nchroot_list_file=\/etc\/vsftpd.chroot_list\r\nls_recurse_enable=YES\r\nlocal_root=public_html\r\nseccomp_sandbox=NO\r\n<\/pre>\n<h2>Step 3: Allowing User Access to Their Home Directory<\/h2>\n<p>To allow a user to access their home directory, you need to edit the vsftpd.chroot_list file. This can be done by running the following command:<\/p>\n<pre>sudo vi \/etc\/vsftpd.chroot_list<\/pre>\n<p>Then, add the user to the file:<\/p>\n<pre>geeks<\/pre>\n<h2>Step 4: Restarting vsftpd<\/h2>\n<p>After making these changes, you need to restart vsftpd for the changes to take effect. This can be done by running the following command:<\/p>\n<pre>sudo initctl restart vsftpd<\/pre>\n<h2>Step5: Verifying the FTP Port<\/h2>\n<p>To ensure that the FTP port is listening, you can run the following command:<\/p>\n<pre>telnet localhost 21<\/pre>\n<p>If the FTP port is listening, you will see a response similar to this:<\/p>\n<pre>\r\nTrying ::1...\r\nTrying 127.0.0.1...\r\nConnected to localhost.\r\nEscape character is '^]'.\r\n220 (vsFTPd 3.0.2)\r\n^]\r\ntelnet&gt; quit\r\n<\/pre>\n<h2>Step 6: Testing from a Windows Client<\/h2>\n<p>Finally, you can test the FTP server from a Windows client. This can be done by running the following command:<\/p>\n<pre>ftp 192.168.0.114<\/pre>\n<p>You will be prompted to enter your username and password. After logging in, you can run the &#8216;pwd&#8217; command to display the current directory:<\/p>\n<pre>\r\nUser (192.168.0.114:(none)): geeks\r\n331 Please specify the password.\r\nPassword:\r\n230 Login successful.\r\nftp&gt; pwd\r\n257 \"\/home\/geeks\/public_html\"\r\nftp&gt;\r\n<\/pre>\n<h2>Commands Mentioned<\/h2>\n<ul>\n<li><span class=\"fw-bold\">sudo apt-get install vsftpd -y<\/span> \u2013 Installs the vsftpd FTP service<\/li>\n<li><span class=\"fw-bold\">sudo vi \/etc\/vsftpd.conf<\/span> \u2013 Opens the vsftpd configuration file for editing<\/li>\n<li><span class=\"fw-bold\">sudo vi \/etc\/vsftpd.chroot_list<\/span> \u2013 Opens the vsftpd.chroot_list file for editing<\/li>\n<li><span class=\"fw-bold\">sudo initctl restart vsftpd<\/span> \u2013 Restarts the vsftpd service<\/li>\n<li><span class=\"fw-bold\">telnet localhost 21<\/span> \u2013 Checks if the FTP port is listening<\/li>\n<li><span class=\"fw-bold\">ftp 192.168.0.114<\/span> \u2013 Connects to the FTP server from a Windows client<\/li>\n<\/ul>\n<h2>FAQs<\/h2>\n<ol itemscope itemtype=\"https:\/\/schema.org\/FAQPage\">\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the vsftpd FTP service?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The vsftpd FTP service is used to transfer files from one machine to another or to a server. It is particularly useful when managing your own VPS or dedicated server for hosting a blog or website.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What does the &#8216;write_enable=YES&#8217; line do in the vsftpd configuration file?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The &#8216;write_enable=YES&#8217; line in the vsftpd configuration file allows FTP users to write to the server, enabling them to upload files.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">What is the purpose of the &#8216;chroot_local_user=YES&#8217; line in the vsftpd configuration file?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">The &#8216;chroot_local_user=YES&#8217; line in the vsftpd configuration file confines FTP users to their home directories, preventing them from accessing other parts of the server&#8217;s file system for security reasons.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How can I check if the FTP port is listening?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can check if the FTP port is listening by running the &#8216;telnet localhost 21&#8217; command. If the port is listening, you will see a response indicating a successful connection.<\/span>\n            <\/p>\n<\/li>\n<li itemscope itemprop=\"mainEntity\" itemtype=\"https:\/\/schema.org\/Question\">\n<p class=\"fw-bold\" itemprop=\"name\">How can I test the FTP server from a Windows client?<\/p>\n<p itemprop=\"acceptedAnswer\" itemscope itemtype=\"https:\/\/schema.org\/Answer\">\n                <span itemprop=\"text\">You can test the FTP server from a Windows client by running the &#8216;ftp&#8217; command followed by the IP address of the server. You will be prompted to enter your username and password. After logging in, you can run commands like &#8216;pwd&#8217; to display the current directory.<\/span>\n            <\/p>\n<\/li>\n<\/ol>\n<h2>Conclusion<\/h2>\n<p>Setting up and configuring an FTP server is a crucial step in managing your own VPS or dedicated server. The vsftpd FTP service is a reliable and secure choice for this purpose. By following the steps outlined in this guide, you can successfully install and configure vsftpd on Ubuntu 14.04. Remember to always verify your setup by checking if the FTP port is listening and by testing the server from a client machine.<\/p>\n<p>For a deeper understanding of the best web servers, you can visit <a href=\"https:\/\/webhostinggeeks.com\/best\/web-server\/\">here<\/a>. If you&#8217;re interested in learning more about different types of servers like Apache, Nginx, and LiteSpeed, you can check out these links: <a href=\"https:\/\/webhostinggeeks.com\/blog\/apache-http-server-explained\/\">Apache<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/nginx-server-explained\/\">Nginx<\/a>, and <a href=\"https:\/\/webhostinggeeks.com\/blog\/litespeed-web-server-explained\/\">LiteSpeed<\/a>. To understand more about different hosting options, you can read about <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-dedicated-server-hosting\/\">dedicated server<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-vps-hosting\/\">VPS server<\/a>, <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-cloud-hosting\/\">cloud hosting<\/a>, and <a href=\"https:\/\/webhostinggeeks.com\/blog\/what-is-shared-hosting\/\">shared hosting<\/a>.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The File Transfer Protocol (FTP) is a universally accepted network protocol utilized for the transfer of files from one machine to another, or to a server. If you&#8217;re managing your&#8230;<\/p>\n","protected":false},"author":6,"featured_media":5174,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"wds_primary_category":0,"footnotes":""},"categories":[2063,1073],"tags":[1396,1536,1856,1858],"class_list":["post-5173","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-ftp","category-ubuntu","tag-ftp-server","tag-linux","tag-ubuntu","tag-ubuntu-14-04"],"_links":{"self":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5173","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/users\/6"}],"replies":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/comments?post=5173"}],"version-history":[{"count":0,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/posts\/5173\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media\/5174"}],"wp:attachment":[{"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/media?parent=5173"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/categories?post=5173"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webhostinggeeks.com\/howto\/wp-json\/wp\/v2\/tags?post=5173"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}