Filex Dragneel Posted July 19, 2020 Share Posted July 19, 2020 In this tutorial i'll show you how to setup/create/make your own FTP server. 1st let's start with , what's FTP and what is it about.. FTP or File Transfer Protocol is a standard network protocol used for the transfer of computer files between a client and server on a computer network. FTP is built on a client-server model architecture using separate control and data connections between the client and the server. FTP users may authenticate themselves with a clear-text sign-in protocol, normally in the form of a username and password, but can connect anonymously if the server is configured to allow it. For secure transmission that protects the username and password, and encrypts the content, FTP is often secured with SSL/TLS (FTPS) or replaced with SSH File Transfer Protocol (SFTP). Open Terminal by pressing CTRL+ALT+T The Terminal looks like this : Make sure your system is up to date. Type in the terminal the following commands: sudo apt-get update sudo apt-get upgrade Install Pure-FTPdPure-FTPd is a free (BSD license) FTP Server with a strong focus on software security. Run the following command to install it: sudo apt-get install pure-ftpd Configure Pure-FTPd Aftter you have installed the FTP server , you'll find all of Pure-FTPd's configuration files in the directoy below. The diffrence between Pure-FTPd and the other FTP servers , is that there's not a single configuration file to configure Pure-FTPd. Diffrent settings have their own file. So, in the below location is where you’ll find the files for individual stetting. /etc/pure-ftpd/conf To configure Pure-FTPd and allow basic security, run the these commands. These commands set individual settings for the server. sudo bash echo "yes" > /etc/pure-ftpd/conf/Daemonize echo "yes" > /etc/pure-ftpd/conf/NoAnonymous echo "yes" > /etc/pure-ftpd/conf/ChrootEveryone echo "yes" > /etc/pure-ftpd/conf/IPV4Only echo "yes" > /etc/pure-ftpd/conf/ProhibitDotFilesWrite exit Quote Daemonize = Runs Pure-FTPd as daemonNoAnonymous = disable Anonymous loginsChrootEveryone = Keep everyone in their home directoryIPV4Only = Only allow IPv4 to connectProhibitDotFilesWrite = Don’t not edit dot files Now , you need to restart the server , so these changes takes an effect , run the following command: sudo systemctl restart pure-ftpd Here are some other settings that you can add: Spoiler echo "yes" > BrokenClientsCompatibility echo "50" > MaxClientsNumber echo "5" > MaxClientsPerIP echo "no" > VerboseLog echo "yes" > DisplayDotFiles echo "yes" > NoChmod echo "no" > AnonymousOnly echo "no" > PAMAuthentication echo "no" > UnixAuthentication echo "/etc/pure-ftpd/pureftpd.pdb" > PureDB echo "yes" > DontResolve echo "15" > MaxIdleTime echo "2000 8" > LimitRecursion echo "yes" > AntiWarez echo "no" > AnonymousCanCreateDirs echo "4" > MaxLoad echo "no" > AllowUserFXP echo "no" > AllowAnonymousFXP echo "no" > AutoRename echo "yes" > AnonymousCantUpload echo "yes" > NoChmod echo "80" > MaxDiskUsage echo "yes" > CustomerProof echo "0" > TLS Create FTP users Now let's create some users & passwords for your FTP server. I'll name my ftp user "fixik_admin" and I will give this user access to my Counter-Strike 1.6 Server files pure-pw useradd fixik_admin -u ftpuser -d /home/Desktop/My\ Files/Counter-Strike\ 1.6/Servers/hlds/27015 -m Now.. while executing this long command , i got an error saying passwd file: no such file or directory... To fix this , run the following commands : sudo touch /etc/pure-ftpd/pureftpd.passwd sudo pure-pw mkdb -F /etc/pure-ftpd/pureftpd.pdb After that , try to run the command for creating user again...IMPORTANT: due to some errors , use the following command below instead of the one that is up: sudo pure-pw useradd fixik_admin -u 2 -g 2 -d /home/Desktop/My\ Files/Counter-Strike\ 1.6/Servers/hlds/27015 -m IMPORTANT: Everytime when you create a new user changed the numbers of "-u 2 -g 2" to something else.Syntax: sudo pure-pw useradd USERNAME -u ID -g ID -d FTP_Directory_FULL_PATH -m After you type this , you'll be asked what password you want to give to the user. Screenshot: Now finnaly to finish this.. , run the following command: sudo pure-pw mkdb Test your FTP Server Simply , open your FTP client like , WinSCP , FileZilla or any other ftp client.. i'll use my Browser and use the link ftp://MY_IP_Address 1 Link to comment Share on other sites More sharing options...
Recommended Posts