How to Setup FTP Server (vsftpd) on Google Cloud Compute Engine Tricks by Rajesh Kumar Sahanee - August 1, 2019April 14, 20200 Post Views: 8,466 Hello Friends, Today we are going learn how to Setup FTP Server (vsftpd) on Google Cloud Compute Engine. Actually one of my client was asking for google cloud based ftp server but this thing was totally new for me and for that reason I had to do research on this and after 2 days finally I got the solution. And now when I have solution so I thought to share it. To Setup FTP server we just need to follow below steps:- Step 1: create a virtual machine instance after clicking create you will see your instance like below screenshot Step 2: Connect to your instance through SSH by clicking on SSH Step 3: Install ftp server (vsftpd) using below command sudo apt-get install vsftpd 1 sudo apt-get install vsftpd Step 4: Configure FTP Server (vsftpd) by updating vsftpd.conf configuration file using below command sudo nano /etc/vsftpd.conf 1 sudo nano /etc/vsftpd.conf the above command will open vsftpd.conf file in nano editor and then we need to do below changes in this configuration file. Look for #write_enable=YES and uncomment by removing # sign to allow ftp users to write files to server. Look for #chroot_local_user=YES and uncomment removing # sign to prevent users to browsing outside their own folder. Look for #local_umask=022 and uncomment it by removing # sign to give correct permissions to uploaded files and folder. Then we need to paste below line at the end of the file #define your ftp directory local_root=/home/ftpuser #to allow upload in root directory allow_writeable_chroot=YES # passive mode min port number pasv_min_port=40000 # passive mode max port number pasv_max_port=50000 12345678 #define your ftp directorylocal_root=/home/ftpuser#to allow upload in root directoryallow_writeable_chroot=YES# passive mode min port numberpasv_min_port=40000# passive mode max port numberpasv_max_port=50000 Step 5: Restart vsftpd and check status using below command sudo systemctl restart vsftpd sudo systemctl status vsftpd 12 sudo systemctl restart vsftpdsudo systemctl status vsftpd Step 6: Create user and add ownership and permissions using below command sudo adduser ftpuser sudo chown ftpuser /home/ftpuser sudo chmod 755 /home/ftpuser 123 sudo adduser ftpusersudo chown ftpuser /home/ftpusersudo chmod 755 /home/ftpuser We will be asked to enter password while adding user, so we need enter password of our choice which will be used later to connect to ftp Step 7: Update firewall rules to allow ports (20-21, 990, 40000 – 50000) Step 8: Connecting to FTP Server Step 9: Secure FTP with TLS (optional) update vsftpd.conf configuration file to look for ssl_enable=NO and we’ll change it to ssl_enable=YES and we are done. Thanks for stopping by Please do share if you like it