copying file from local machine to Ubuntu 12.04 returning permission denied

475 views Asked by At

How to I grant myself permission to transfer a .crt file from my local machine to the aws ubuntu 12.04 server?

I am using the following command from my machine and receiving a permission denied response.

scp -i /Users/me/key_pair.pem /Users/me/ssl-bundle.crt [email protected]:/etc/ssl/certs/

I am following comodo's instruction. Refer to the heading Configure your nginx Virtual Host from the link. I have not set anything up with regards to permission as user. This is a little new to me and will appreciate further sources of information.

2

There are 2 answers

0
meteorBuzz On

I changed the permission of the path on the server and transferred the file!

With reference to File Permissions , I gave the /etc/ssl/certs/ path the "Add other write & execute" permission by this chmod command when ssh'd into the Ubuntu server:

sudo chmod o+wx /etc/ssl/certs/

Then, on my local machine, the following command copied a file on my directory and transferred it to destination:

scp -i /Users/me/key_pair.pem /Users/me/ssl-bundle.crt [email protected]:/etc/ssl/certs/

It is the write permission you need, and depending on your use case, use the appropriate chmod command.

1
Ramprasad On

Simplest way to transfer files from local to ec2 (or) ec2 to local by FileZila. You can connect with your instance by using Filezila, then transfer files from local to server and vice-versa.