How to use FileZilla to upload file to Google Cloud Platform VM Instance

How to use FileZilla to upload file to Google Cloud Platform VM Instance

In our previous article, we learned about How to download and Install google cloud SDK. If you did not installed Google cloud SDK, please install it first. In this article, we are going to learn about How to use FileZilla to upload files to google cloud compute engine VM instance. For this, we need to first download FileZilla. You can download FileZilla by visiting https://filezilla-project.org

One the installer is downloaded successfully, we are going to install FileZilla. FileZilla installation is straightforward. Launch the installer and click Next next to Install FileZilla.

Login to cloud.google.com in your default browser.

Launch Google Cloud Shell SDK and run ‘gcloud auth login’. This command is going to open your default browser for login. We already logged in so we need to select our account. Finally, allow access to google cloud SDK. Following are supporting images for this step.

Next, open Compute Engine → VM instance → Select VM Instance and Copy gcloud command line under SSH. Paste the command in Google Cloud SDK Shell. If you are running this command first time it is going to create SSH Keys. Which we are going to use in FileZilla. Type Y for confirmation. Google Cloud SDK is going to create some support key files for connection. We are going to use private key is available in C:\Users\<UserName>\.ssh for login. Following are some images for this step.

 

We are going to use this files for connection using FileZilla. Open FileZilla.Open settings → SFTP → Finally add your PPK file. Finally, click on OK to close the settings.

Now we are going to create a new Website Connection using SFTP. For this provide your VM instance IP address, user and type SFTP. Finally, connect. By default, we are in user home directory but our website files are available in /var/www/html folder. Open this folder and try to upload files.

If you want to check current owner for /var/www/html folder execute command shown in the below image.

If permission denied for Upload execute the command to give you user permission for /var/www/html directory.

Execute command “sudo setfacl -m u:username:rwx /var/www/html”.

sudo chown username -R /var/www/html
sudo chown username /var/www/html/index.html

This command gave username read and write permission. Try one more time and now we are able to upload files now.

0 Comments
Leave A Comment

Please login to post your valuable comments.

Join the newsletter

Get the latest vLemonn news first

share