{"id":166,"date":"2015-05-19T07:01:56","date_gmt":"2015-05-19T07:01:56","guid":{"rendered":"https:\/\/www.nonamehosts.com\/blog\/?p=166"},"modified":"2015-05-19T07:01:56","modified_gmt":"2015-05-19T07:01:56","slug":"how-to-setup-vsftpd-on-centos-7","status":"publish","type":"post","link":"https:\/\/www.nonamehosts.com\/blog\/tutorials\/how-to-setup-vsftpd-on-centos-7\/","title":{"rendered":"How to setup vsftpd on CentOS 7"},"content":{"rendered":"<p>To have your own ftp server running on your VPS &#8211; you can use either proftpd or vsftpd servers. In this howto we&#8217;ll setup and configure vsftpd for basic needs. To begin we have to install the package:<\/p>\n<p><!--more--><\/p>\n<pre class=\"lang:sh decode:true \">[root@testvm ~]# yum -y update\n[root@testvm ~]# yum -y install vsftpd<\/pre>\n<p>Now make sure that you enable these options in \/etc\/vsftpd\/vsftpd.conf:<\/p>\n<pre class=\"lang:sh decode:true  \">[root@testvm ~]# vim \/etc\/vsftpd\/vsftpd.conf<\/pre>\n<p>Options to enable:<\/p>\n<p>Disallow anonymous users to access FTP:<\/p>\n<pre class=\"lang:sh decode:true\">anonymous_enable=NO<\/pre>\n<p>Allow local uses to login:<\/p>\n<pre class=\"lang:sh decode:true \">local_enable=YES<\/pre>\n<p>Allow users to write to their directories:<\/p>\n<pre class=\"lang:sh decode:true \">write_enable=YES<\/pre>\n<p>Lock users in their home directories, disallowing them to browse outside their directories:<\/p>\n<pre class=\"lang:sh decode:true \">chroot_local_user=YES<\/pre>\n<p>Save the file and exit from vim by typing:<\/p>\n<pre class=\"lang:sh decode:true \">:wq<\/pre>\n<p>Now let&#8217;s restart the vsftpd service to get new settings and enable it to run on startup:<\/p>\n<pre class=\"lang:sh decode:true\">[root@testvm ~]# systemctl restart vsftpd\n[root@testvm ~]# systemctl enable vsftpd\n<\/pre>\n<p>If you have ftp enabled by default &#8211; open the port on it:<\/p>\n<pre class=\"lang:sh decode:true \">[root@testvm ~]# firewall-cmd --permanent --add-port=21\/tcp\n[root@testvm ~]# firewall-cmd --permanent --zone=public --add-port=10090-10100\/tcp\n[root@testvm ~]# firewall-cmd --reload<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>To have your own ftp server running on your VPS &#8211; you can use either proftpd or vsftpd servers. In this howto we&#8217;ll setup and configure vsftpd for basic needs. To begin we have to install the package:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[19,20,41,45,57,58,69,118,128,145,156],"class_list":["post-166","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-centos","tag-chroot_local_user","tag-firewall-cmd","tag-ftp","tag-howto","tag-install","tag-local_enable","tag-setup","tag-systemctl","tag-vsftpd","tag-write_enable"],"_links":{"self":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/166","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/comments?post=166"}],"version-history":[{"count":0,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/posts\/166\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/media?parent=166"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/categories?post=166"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.nonamehosts.com\/blog\/wp-json\/wp\/v2\/tags?post=166"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}