amazon ec2 - permission denied error while trying to copy file from my desktop to a ec2 instance using scp command - Stack Overf

I am trying to copy a file from my windows machine to ec2 instance. I am using following command to do

I am trying to copy a file from my windows machine to ec2 instance. I am using following command to do so.

scp -i "C:\Users\abc\AWSServer\MyEc.pem" "C:\Users\ABC\Mypython.py" ec2-user@_._.__.__:/home/ec2-user/PythonProgram

I am getting the permission denied error like follows:

scp: dest open "/home/ec2-user/PythonProgram/Mypython.py": Permission denied
scp: failed to upload file C:/Users/ABC/Mypython.py to /home/ec2-user/PythonProgram

does anybody knows the solution.

I am trying to copy a file from my windows machine to ec2 instance. I am using following command to do so.

scp -i "C:\Users\abc\AWSServer\MyEc.pem" "C:\Users\ABC\Mypython.py" ec2-user@_._.__.__:/home/ec2-user/PythonProgram

I am getting the permission denied error like follows:

scp: dest open "/home/ec2-user/PythonProgram/Mypython.py": Permission denied
scp: failed to upload file C:/Users/ABC/Mypython.py to /home/ec2-user/PythonProgram

does anybody knows the solution.

Share asked Nov 22, 2024 at 6:34 monamona 1095 silver badges18 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

Okay i got the answer. i changed the permission to the directory using chmod command

sudo chmod a+w /home/ec2-user/PythonProgram

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1742294063a4416756.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信