![]() Ports 40000-50000 will be reserved for the range of passive ports that will eventually be set in the configuration file and port 990 will be used when TLS is enabled. In this step let's open ports 20 and 21 for FTP traffic. Sudo chown nombre-usuario:nombre-usuario /home/nombre-usuario/ftp/filesĪt this point, we will create a test file in the files folder:Įcho "vsftpd archivo de ejemplo" | sudo tee /home/nombre-usuario/ftp/files/ejemplo.txt Securing the FTP server Sudo mkdir /home/nombre-usuario/ftp/files We continue creating file container directory and we will assign the property: Now we remove the write permissions of this folder: sudo chmod a-w /home/nombre-usuario/ftp Sudo chown nobody:nogroup /home/nombre-usuario/ftp ![]() We will set the property of the folder with this other command: To begin with we create the FTP folder: sudo mkdir ftp ![]() For this example, we are going to create an ftp directory that will act as a chroot, along with a directory of modifiable files. With chroot enabled, a local user is restricted to their home directory ( default). Vsftpd uses chroot cages to achieve this. Ideally, FTP should be restricted to a specific directory for security reasons. Now we are going to set a password:Īfter we are going to move to the newly created user folder: cd /home/nombre-usuario Replaces' username'by your intended username. In the terminal (Ctrl + Alt + T) we will only have to use the command: With this We can use any FTP client to access the files hosted on the server through vsftpd. Sudo systemctl enable vsftpd FTP user account Now let's start service with the command: sudo systemctl start vsftpd If something goes wrong, the default settings can be restored. Once installed, we will start with make a copy of the original configuration file. If you don't have it installed on your computer, can be installed with the command (Ctrl + Alt + T): Install an FTP server in Ubuntu Install vsftpdįor this example, I am going to install an FPT server on my local network on Ubuntu 20.04.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |