Now, use the following command to verify the permissions: sudo ls -la /home/hostinger/ftp Then, set the ownership using: sudo chown nobody:nogroup /home/hostinger/ftpįinally, remove the write permission: sudo chmod a-w /home/hostinger/ftp Use the following command to create the FTP folder:.It contains a writable directory that will be responsible for holding the required files. Instead, we will make an ftp directory which acts as chroot. To fix this, we don’t have to remove write privileges from the home folder. However, it is possible that because of vsftpd security, a user might not be able to write to that directory. That is why vsftpd uses chroot jails, which limits a local user to their home directory by default. Ideally, FTP should be restricted to one specific directory for security purposes. Then, enter a password for the user and fill in all the required details.Remember to change the username according to your own preference. Once the firewall is set up, we must create the user who is going to use the FTP access.Now let’s look at the status again: sudo ufw statusThe output should look something like this:Status: active To Action From - OpenSSH ALLOW Anywhere 990/tcp ALLOW Anywhere 20/tcp ALLOW Anywhere 21/tcp ALLOW Anywhere 40000:50000/tcp ALLOW Anywhere OpenSSH (v6) ALLOW Anywhere (v6) 20/tcp (v6) ALLOW Anywhere (v6) 21/tcp (v6) ALLOW Anywhere (v6) 990/tcp (v6) ALLOW Anywhere (v6) 40000:50000/tcp (v6) ALLOW Anywhere (v6).port 990 will be used when TLS is enabled.ports 40000:50000 will be reserved for the range of passive ports that will eventually be set in the configuration file.Sometimes, this option is enabled by default. OpenSSH is required if you still wish to access your server via SSH.This series of commands will open up several ports: To do that, execute the following commands one by one: If it’s already active, you still need to make sure FTP traffic is allowed.You can install and enable it by typing:sudo apt-get install ufw sudo ufw enable Simply run this command to verify the status: sudo ufw statusIf you see the following message:ufw: command not foundIt means that the firewall is not installed. But first, let’s just see whether the firewall is already enabled on your machine or not. To allow the Ubuntu FTP server to communicate via the internet, it needs to make its way through the firewall.Step 2 – Allowing FTP Traffic from the Firewall Now we are ready to configure the firewall. After the installation is completed, you should back up the original file so you can start with a blank configuration file:.You will be prompted with a confirmation message, which will require you to type Y and hit Enter to continue with the installation. Once it’s done, install the vsftpd daemon using the command below:.Wait for all the processes to complete, and you will see a confirmation as soon as the update finishes. First of all, we’ll have to get our package updates before we proceed with the vsftpd installation.If you own Hostinger’s VPS, the login details are available in the Server tab of the hPanel. This tutorial requires you to know how to connect to a server through SSH. Therefore, you need to make sure your VPS is running on that particular OS. The difference is that FTP is responsible for transporting files through the internet while HTTP and SMTP handle the transfer of web pages and emails, respectively.īefore we begin, keep in mind that we will guide you through configuring an FTP server on Ubuntu 18.04. This is somewhat similar to HTTP (HypertText Transfer Protocol) or SMTP (Simple Mail Transfer Protocol). It also makes use of a client-server framework and SSL/TLS security to ensure secure and reliable data transfer. Step 6 – Testing Connection with FileZillaįTP, or File Transfer Protocol, is a means to share files between computers over an internet connection using the TCP/IP protocol.Step 2 – Allowing FTP Traffic from the Firewall.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |