0

So I installed a LAMP on a Google Cloud instance with debain wheezy7. Everything is working fine but I am not able to work the ftp. I am following this tutorial by digital ocean

I am stuck at this last step where I need to make vsftpd allow the user to write outside the chroot file.

The error is get is

hetunandu_gmail_com@lamp:~$ mkdir /root/hetunandu/files mkdir: cannot create directory /root/hetunandu/files': Permission denied

Then when i use sudo with it i get this error

hetunandu_gmail_com@lamp:~$ sudo mkdir /root/hetunandu/files mkdir: cannot create directory /root/hetunandu/files': No such file or directory

Where do I go from here?

Also I dont know how to get my username and password setup for FTP

Hetu Nandu
  • 15
  • 8

2 Answers2

2

I followed the tutorial and could not replicate your issue. I initially got "Permission denied" but you can circumvent this by running:

$ sudo su

and then

$ mkdir -p /root/$USER/files

Why not use /home/$USER ? not sure why you want to create the folders under /root.

As for your second question, regarding the username and password, I am not sure I understand. From the Developers Console > Compute Engine > VM Instances > click SSH and that should log you in with root privileges. then you can create all the users you want:

$ sudo adduser test_user
Marius I
  • 1,461
  • 12
  • 13
1

Please don't use FTP as it's an insecure clear-text protocol which will let others see your password and easily get access your instance, read/modify/delete your files, etc.

Instead, you should use secure protocols such as SCP or SFTP with public key authentication.

Here are some options to transfer files to/from your GCE VM instance:

Community
  • 1
  • 1
Misha Brukman
  • 12,938
  • 4
  • 61
  • 78