{"id":73,"date":"2023-03-03T23:49:26","date_gmt":"2023-03-03T23:49:26","guid":{"rendered":"https:\/\/smartsource.com.sg\/blog\/?p=73"},"modified":"2023-03-03T23:49:26","modified_gmt":"2023-03-03T23:49:26","slug":"creating-a-ftp-user-for-a-specific-folder-in-linux","status":"publish","type":"post","link":"https:\/\/smartsource.com.sg\/blog\/index.php\/2023\/03\/03\/creating-a-ftp-user-for-a-specific-folder-in-linux\/","title":{"rendered":"Creating a FTP user for a specific folder in linux"},"content":{"rendered":"\n<p>If you want to allow FTP connections to your linux machine and create username \/ password for a user and restrict the user to a specific folder when he\/she logs in using the ftp client, you can follow the below steps.<\/p>\n\n\n\n<p>First of all, you should have an FTP server setup. You can install vsftpd server in linux, using apt-get or yum depending on your distribution. Once done, you follow the below steps.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>#1. Create a normal linux user for eg. Tom\r\nuseradd tom\npasswd tom\n\r\n#2. to prevent the ssh login. \r\nusermod -s \/sbin\/nologin tom\n\r\n#3. restrict access to a particular folder\r\nusermod -d \/home\/tom tom\r\n\r\n#4. change settings in vsftpd config\r\n\r\nvim \/etc\/vsftpd\/vsftpd.conf\r\n\r\n#5. comment below line in that file\r\n#connect_from_port_20=YES\r\n\r\n#6. make sure this is changed to YES\npasv_enable=YES\r\npasv_min_pz<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>If you want to allow FTP connections to your linux machine and create username \/ password for a user and restrict the user to a specific folder when he\/she logs&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19],"tags":[54,8,53],"class_list":["post-73","post","type-post","status-publish","format-standard","hentry","category-tutorials","tag-ftp","tag-linux","tag-vsftpd"],"_links":{"self":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/73","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=73"}],"version-history":[{"count":1,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":74,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/posts\/73\/revisions\/74"}],"wp:attachment":[{"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/smartsource.com.sg\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}