You are here
Home > Tricks > How to Setup FTP Server (vsftpd) on Google Cloud Compute Engine

How to Setup FTP Server (vsftpd) on Google Cloud Compute Engine

vsftpd-featured

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

gcp-ftp-server-create-instance

after clicking create you will see your instance like below screenshot

Step 2: Connect to your instance through SSH by clicking on SSH

gcp-ftp-server-ssh-connected

Step 3: Install ftp server (vsftpd) using below command

gcp-ftp-server-installing-vsftpd

Step 4: Configure FTP Server (vsftpd) by updating vsftpd.conf configuration file using below command

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

Step 5: Restart vsftpd and check status using below command

gcp-ftp-server-restart-check-status

Step 6: Create user and add ownership and permissions using below command

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)

gcp-ftp-server-create-firewall-rule

Step 8: Connecting to FTP Server

gcp-ftp-server-filezilla-connected

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

Rajesh Kumar Sahanee
I am a passionate Java Developer and I like Computer Programming. I love to do some interesting experiments and listening music in my free time.
https://www.zatackcoder.com

Comments

zatackcoder
Top

  Â