{"id":35,"date":"2012-06-11T14:43:15","date_gmt":"2012-06-11T14:43:15","guid":{"rendered":"http:\/\/www.buildingcubes.com\/?p=35"},"modified":"2022-09-26T13:11:44","modified_gmt":"2022-09-26T13:11:44","slug":"adding-an-ftp-server-and-setting-up-users-to-access-directories","status":"publish","type":"post","link":"https:\/\/www.voodoo.business\/blog\/2012\/06\/11\/adding-an-ftp-server-and-setting-up-users-to-access-directories\/","title":{"rendered":"Adding an FTP server and setting up users to access directories"},"content":{"rendered":"\n<p>This post is rather old, and everything is secure on the internet these days, so rather than FTP, it is recommended that you setup the new user with SFTP instead (Secure file transfer protocol), SCP is another option, but i have an sftp article ready for you <a href=\"https:\/\/www.qworqs.com\/2022\/09\/26\/giving-sftp-access-to-a-user-for-a-certain-directory\/\">here<\/a><\/p>\n\n\n<p>So here is a quick guide to setting up a user to have access to a certain directory via FTP<\/p>\n<p>You probably already use a Linux server, you access your files via SFTP or SCP, but you want to give someone access to a certain directory within.<\/p>\n<p>Here is how it is done on a Debian squeeze machine<\/p>\n<pre>apt-get install pure-ftpd-common pure-ftpd\n\nThen we need to add a group and default user for our program<\/pre>\n<pre>groupadd ftpgroup\nuseradd -g ftpgroup -d \/dev\/null -s \/etc ftpuser\n\npure-pw useradd test1 -u ftpuser -d \/home\/ftpusers\/test1\n\npure-pw mkdb<\/pre>\n<p>This creates the file mentioned earlier called \/etc\/pureftpd.pdb, this file houses all information related to your virtual users<\/p>\n<pre>pure-pw passwd test1<\/pre>\n<p>Once password is set, update the database<\/p>\n<pre>pure-pw mkdb<\/pre>\n<p>To delete a user<\/p>\n<pre>pure-pw userdel test1\n\npure-pw show test1<\/pre>\n<pre>pure-ftpwho<\/pre>\n<p>Create symlink to add PureDB to authentication methods<\/p>\n<pre>cd \/etc\/pure-ftpd\/auth\nln -s ..\/conf\/PureDB 50pure<\/pre>\n<p>Disable PAM authentication unless you need it<\/p>\n<pre>echo no &gt; \/etc\/pure-ftpd\/conf\/PAMAuthentication<\/pre>\n<p>Disable UNIX authentication unless you need it<\/p>\n<pre>echo no &gt; \/etc\/pure-ftpd\/conf\/UnixAuthentication<\/pre>","protected":false},"excerpt":{"rendered":"<p>This post is rather old, and everything is secure on the internet these days, so rather than FTP, it is recommended that you setup the new user with SFTP instead (Secure file transfer protocol), SCP is another option, but i have an sftp article ready for you here So here is a quick guide to [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[155,4,154,1],"tags":[],"class_list":["post-35","post","type-post","status-publish","format-standard","hentry","category-ftp","category-linux","category-sftp","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/35","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/comments?post=35"}],"version-history":[{"count":2,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions"}],"predecessor-version":[{"id":1814,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/posts\/35\/revisions\/1814"}],"wp:attachment":[{"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/media?parent=35"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/categories?post=35"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.voodoo.business\/blog\/wp-json\/wp\/v2\/tags?post=35"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}