![]() ![]() By doing it, we enable the option to create users that cannot log into shell. They can access the FTP with these credentials and no one else can access this server without those credentialsīefore you create a user firstly add the /bin/false to your / etc/shells file. FTP User: Users that have credentials are known as FTP users.This should not be active on public networks and should only be active on a home server or a company LAN. Anonymous FTP: This allows anyone to access the server without any credentials.Here’s how the file looks like:įTP comes with two types of users which are: You can remove the comments # and configure your file according to your needs. Type the following to see what’s inside the file: sudo nano /etc/proftpd/nf You can use nano command to check what’s inside the file. However, in this article, I’m going to configure it according to the TLS connection. It has lots of options you can configure it according to your requirements. It needs to be configured to make it a fully functional and secure server before use. ProFTPD configuration file is located at /etc/proftpd/nf directory. Now you can confirm that your ProFTPD server is active by the following command: sudo systemctl status proftpd To do that type the following command: sudo systemctl start proftpd Now start and enable your ProFTPD server so that it starts automatically during boot time. Keep in mind that ProFTPD is available in default repositories of Ubuntu 20.4 and can be installed automatically by the following command: sudo apt-get install proftpd -y Pre-Requisitesįirstly, before we get started here are a few things that you should have before you start the installation process.įirstly, update your system so that all the repositories and dependencies are up to date so that you would get the latest stable version of the ProFTPD FTP server. This FTP version is very versatile because it can support TLS (SSL) for a secure connection. It was released and distributed under the GNU Public License. Its environment exposes a person to many configuration options and a person who has used FTP before on Unix system will learn this version very easily. It is available on Linux and Unix-like machines but can also be used in Windows via Cygwin. If you have any questions, feel free to comment, I will answer all your questions.ProFTPD is a highly enriched flavor of FTP server. If you are new to AWS and wondering about LAMP installation, here is the guide. In this guide, you learned how to configure FTP on Amazon EC2 Server. Now, you can login with your FTP client such as filezilla or any other. Process: 26682 ExecStartPre=/bin/mkdir -p /var/run/vsftpd/empty (code=exited, status=0/SUCCESS) Loaded: loaded (/lib/systemd/system/rvice enabled vendor preset: enabled)Īctive: active (running) since Thu 04:16:27 UTC 3s ago If all working fine, you should see following. Now, restart the FTP server to make sure everything running perfectly with following commands. x with the IP address of the EC2 Instance and listen=YES to remove the warning message from the FTP client. $ sudo chown programmer_1:programmer_1 /home/programmer_1/ftp_files/uploads Step 5: FTP server configurationīefore configuring the vsftpd configuration file located in /etc/vsftpd, take a backup of the file. Now we will create sub directory where FTP user will upload the files with ownership assign $ sudo mkdir /home/programmer_1/ftp_files/uploads a-w means – all/everyone remove write permissions.$ sudo chown nobody:nogroup /home/programmer_1/ftp_filesĪdded some more permission $ sudo chmod a-w /home/programmer_1/ftp_files Now, set ownership of the newly created directory of the FTP user. $ sudo mkdir /home/programmer_1/ftp_files I will create a home directory for the FTP user. It completely depends upon the user rules, let’s give users only home directory access, what users will upload, update or download files there. Save the file and restart SSH service by following command $ sudo service sshd restart Step 4: Access Rights $ sudo vi /etc/ssh/sshd_configĪdd the following line to the file DenyUsers programmer_1 $ sudo adduser programmer_1Īs we will share only FTP access to the user (programmer_1), we have to modify SSH configuration file to prevent SSH access from the FTP user. Let’s create a user with user name programmer_1. Now you have to create user with proper access rights. It should be active now, and shows similar to the below. Now run following commands $ sudo ufw allow 20:21/tcpĪfter firewall enable, check status again $ sudo ufw status In the security groups inbound rules, you have to add following rules.Īfter adding this port to security group, now you have to check firewall status by following command $ sudo ufw status $ sudo service vsftpd status Step 2 : Firewall Configuration ![]()
0 Comments
Leave a Reply. |