How to connected to google cloud linux server using ftp

909 views
Skip to first unread message

randal...@hotmail.com

unread,
Oct 3, 2018, 12:07:57 AM10/3/18
to gce-discussion
I have setup FTP and am able to transfer between servers but I need to connect from my laptop and am having a time. I tried to go into the firewall rules and create a rule but when I try to specify FTP, I get a message back telling me it is an invalid protocol.
Please help, we are trying to transfer files back and forth using java, and have now come to a complete halt.

Shamma Nikhat (Cloud Platform Support)

unread,
Oct 3, 2018, 11:35:50 AM10/3/18
to gce-discussion

Google Cloud platform gives different options to transfer files to your instance back and forth. You can check this [documentation] (https://cloud.google.com/compute/docs/instances/transfer-files ) to find more options.

You can use a third party tool to connect to any instance that is configured with the matching public SSH key file. You have to configure the public key on the server side. In this [link] (https://www.youtube.com/watch?v=wDcjM7BySo0 ) you can find a video that gives you step by step procedure to set up cloud FTP with FileZilla.

You can use SCP to transfer your files securely and the scp tool uses the same key files that you use to connect to your instances using standard SSH.


randal...@hotmail.com

unread,
Oct 3, 2018, 6:03:50 PM10/3/18
to gce-discussion
Yes, except, like I said in my post, I need to use FTP based on not wanting to repeat a ton of work. Can anyone tell me how to get FP working from outside the LAN

Luis Valenzuela

unread,
Oct 3, 2018, 10:46:18 PM10/3/18
to gce-discussion
Just see the video, and save the configua ation, Its pretty easy, and work fine

Shamma Nikhat (Cloud Platform Support)

unread,
Oct 4, 2018, 10:31:24 AM10/4/18
to gce-discussion

As you said in your initial post that you were able to setup FTP and transfer files between GCE VMs. In order to connect to your laptop you need to make sure you setup the FTP server properly and is listening in your VM instance. In the firewall rule of your GCE network you need to open port 21.

If you have any more questions and concerns you can follow this [video] (https://www.youtube.com/watch?v=wDcjM7BySo0) and follow the step by step procedure to establish FTP connection.

randal...@hotmail.com

unread,
Oct 5, 2018, 6:54:20 AM10/5/18
to gce-discussion
I opened TCP port 21 and can get through but am unable to change directories or see anything, it is still acting up and I have applied chmod 777 to the directory. I can't tell what it is.

Dan Bryant

unread,
Oct 5, 2018, 7:39:14 AM10/5/18
to randal...@hotmail.com, gce-discussion
Like I mentioned before, need both 20 and 21 

 "tcp:20;tcp:21


--
© 2018 Google Inc. 1600 Amphitheatre Parkway, Mountain View, CA 94043
 
Email preferences: You received this email because you signed up for the Google Compute Engine Discussion Google Group (gce-dis...@googlegroups.com) to participate in discussions with other members of the Google Compute Engine community and the Google Compute Engine Team.
---
You received this message because you are subscribed to the Google Groups "gce-discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gce-discussio...@googlegroups.com.
To post to this group, send email to gce-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gce-discussion/2ec46aef-b169-44e2-aee1-8246789ee208%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Shamma Nikhat (Cloud Platform Support)

unread,
Oct 5, 2018, 4:47:53 PM10/5/18
to gce-discussion
It seems like you are copying files to system directories which your user doesn't have access to. There are two options that you could follow to access the directories.
1. You can FTP using root user and access the system directories to copy the files.
2. You can FTP using non-root user and copy the file into the home directory of that user. Once done ssh the instance using the same user and copy the files over to system directory using ‘sudo cp SOURCE DESTINATION’ command.
As you mentioned that you have applied chmod 777 to the directory. This is not recommended because this could cause security issues.

randal...@hotmail.com

unread,
Oct 5, 2018, 11:08:37 PM10/5/18
to gce-discussion

randal...@hotmail.com

unread,
Oct 5, 2018, 11:09:29 PM10/5/18
to gce-discussion
I have anonymous setup as the user and am trying with that. I don't care about security at this point, just need it to work for a demo. Nothing is working

Patrick (Cloud Platform Support)

unread,
Oct 8, 2018, 9:42:32 AM10/8/18
to gce-discussion
Can you clarify what you mean by "nothing is working"?
Are you unable to FTP at all? If so, what is the error message?
Are you connecting but still unable to change directories?
Are you able to copy files anywhere?
Are you able to SSH to the VM instance?

張.Huiwu

unread,
Oct 8, 2018, 11:49:52 AM10/8/18
to gce-discussion
I have a similar question but I'm more interested in how I can gain permission to delete files or create directories using a ftp client like filezilla.
thanks.

Germán (Google Cloud Support)

unread,
Oct 9, 2018, 3:36:41 PM10/9/18
to gce-discussion
You can follow the instructions at this third party website under your own risk to connect using Filezilla [1]

Reply all
Reply to author
Forward
0 new messages