After implementing a fresh new instance on google cloud platform, i tried to upload files using ftp. But i got an error saying PERMISSION DENIED.
First login to your google cloud platform then select the relevant project from the header drop down.
After that using the left slide in menu go to > Compute Engine > VM Instances.
There next to your instance there will be an option to click on SSH. Click it and a console will open in new tab.
For us to be able to upload files to google cloud instance, we must change the permission of the required folder to 777
First of let us check the current permission status of the folder. To check that run the following command in the console.
First login to your google cloud platform then select the relevant project from the header drop down.
After that using the left slide in menu go to > Compute Engine > VM Instances.
There next to your instance there will be an option to click on SSH. Click it and a console will open in new tab.
For us to be able to upload files to google cloud instance, we must change the permission of the required folder to 777
First of let us check the current permission status of the folder. To check that run the following command in the console.
stat -c "%a %n" /path/to/file
Now when you run the above code, you will see the current permission status. It will be either 644 or 755 or something other than 777. We need to change it to 777 and for that we need to run the following command
sudo chmod 777 /path/to/file
Now restart Apache using the code
sudo service apache2 graceful
And try uploading your files using FTP.
0 Comments