{"id":5558,"date":"2023-12-01T12:06:27","date_gmt":"2023-12-01T12:06:27","guid":{"rendered":"https:\/\/natsav.com\/blog\/?p=5558"},"modified":"2024-01-31T12:16:32","modified_gmt":"2024-01-31T12:16:32","slug":"install-ftp-in-centos-7","status":"publish","type":"post","link":"https:\/\/natsav.com\/blog\/install-ftp-in-centos-7\/","title":{"rendered":"How to Install FTP in Centos 7"},"content":{"rendered":"<p><span style=\"text-decoration: underline;\"><strong><span style=\"color: #000000; text-decoration: underline;\">Step 1: Update the Package Repository.<\/span><\/strong><\/span><span style=\"text-decoration: underline;\"><strong><br \/>\n<\/strong><\/span>a). Before <a href=\"https:\/\/natsav.com\/blog\/install-php-7-4-on-centos-7\/\">installing<\/a> any software, it&#8217;s a good practice to update the package repository to ensure you are getting the latest versions of packages. Open a terminal and run:-<br \/>\n# [ sudo yum update ]<\/p>\n<p><span style=\"text-decoration: underline; color: #000000;\"><strong>Step 2:<\/strong> <\/span><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Install vsftpd<\/span>.<\/span><br \/>\n<\/strong>a). Once the repository is updated, you can install vsftpd using the following command:-<br \/>\n# [ sudo yum install vsftpd ]<\/p>\n<p><span style=\"color: #000000;\"><strong><span style=\"text-decoration: underline;\">Step 3: <\/span><span style=\"text-decoration: underline;\">Start and Enable vsftpd<\/span>.<\/strong><\/span><br \/>\na). After installation, start the vsftpd service and enable it to start on boot:-<br \/>\n# [ sudo systemctl start vsftpd ]<br \/>\n# [ sudo systemctl <span class=\"hljs-built_in\">enable<\/span> vsftpd ]<\/p>\n<p><span style=\"text-decoration: underline; color: #000000;\"><strong>Step 4: Adjust Firewall Rules<\/strong><\/span><strong><span style=\"color: #000000;\">.<\/span><br \/>\n<\/strong>a). If you have a firewall enabled, you&#8217;ll need to allow FTP traffic. The default FTP port is 21. You can open the FTP port using the following command.<br \/>\n# [ sudo firewall-cmd &#8211;permanent &#8211;add-port=21\/tcp sudo firewall-cmd &#8211;reload ]<\/p>\n<p><span style=\"text-decoration: underline; color: #000000;\"><strong>Step 5: Create a User for FTP<\/strong><\/span><strong><span style=\"color: #000000;\">.<\/span><br \/>\n<\/strong>a). You may want to create a specific user for FTP access. Replace <code>'&lt;username&gt;'<\/code> with the desired username.<br \/>\n# [ sudo useradd -m &lt;username&gt; ]<br \/>\n# [ sudo passwd &lt;username&gt; ]<\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 6: Configure vsftpd<\/span>.<\/span><br \/>\n<\/strong>a). Edit the vsftpd configuration file to customize settings. Open the configuration file in a text editor. Here, we&#8217;ll use <code>'nano'<\/code>, but you can use any text editor you prefer.<br \/>\n# [ sudo nano \/etc\/vsftpd\/vsftpd. Conf ]<br \/>\nb). Make the following changes or additions:-<br \/>\n# [ anonymous_enable=NO ]<br \/>\n# [ local_enable=YES ]<br \/>\n# [ write_enable=YES ]<br \/>\n# [ chroot_local_user=YES ]<br \/>\n# [ allow_writeable_chroot=YES ]<br \/>\nc). Save and exit the editor.<\/p>\n<p><strong><span style=\"color: #000000;\"><span style=\"text-decoration: underline;\">Step 7: Restart vsftpd<\/span>.<\/span><br \/>\n<\/strong>a). After making changes to the configuration, restart the vsftpd service.<strong><br \/>\n<\/strong># [ sudo systemctl restart vsftpd ]<\/p>\n<p><span style=\"color: #000000;\"><strong>Conclusion<\/strong><\/span>: Your FTP server should now be up and running on CentOS 7. You can use an FTP client to connect to your server using the username and password you created earlier. Keep in mind that FTP transmits data in plain text, so it&#8217;s recommended to use it in a secure network or consider using FTPS (FTP Secure) or SFTP (SSH File Transfer Protocol) for encrypted connections.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Step 1: Update the Package Repository. a). Before installing any software, it&#8217;s a good practice to update the package repository to ensure you are getting the latest versions of packages. Open a terminal and run:- # [ sudo yum update ] Step 2: Install vsftpd. a). Once the repository is updated, you can install vsftpd [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":5580,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[256],"tags":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/natsav.com\/blog\/wp-content\/uploads\/2023\/12\/ftp-centos.png?fit=603%2C283&ssl=1","jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5558"}],"collection":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/comments?post=5558"}],"version-history":[{"count":8,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5558\/revisions"}],"predecessor-version":[{"id":5847,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/posts\/5558\/revisions\/5847"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media\/5580"}],"wp:attachment":[{"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/media?parent=5558"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/categories?post=5558"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/natsav.com\/blog\/wp-json\/wp\/v2\/tags?post=5558"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}