Amazon AWS Filezilla transfer says : permission denied

+3 votes

I have my instance running on the Amazon AWS, it's test page is up.

Whenever I  try to SFTP my files to the server to display on my website, I have Filezilla connected to the AWS server but when I try to move the files from my local machine to the /var/www/html directory, it says permission denied.
I just figured out I must move the files to the /home/ec2-user directory.
 So my files are on the server I guess.
But when I try to move them from there to the /var/www/html directory, it still won't move them, says permission denied.
Any Help!
Thanks

UPDATE: A screenshot from it 

enter image description here

May 3, 2018 in AWS by Flying geek
• 3,160 points
3,553 views

2 answers to this question.

+1 vote
Best answer

Well, I can't see your screenshot that you have added here.

However, there are different scopes of approach

Take a look below : 

if you are using:

For Centos

sudo chown -R centos:centos /var/www/html

sudo chmod -R 755 /var/www/html

For Ubuntu

sudo chown -R ubuntu:ubuntu /var/www/html

sudo chmod -R 755 /var/www/html

For Amazon AMI

sudo chown -R ec2-user:ec2-user /var/www/html

sudo chmod -R 755 /var/www/html

Hope it helps, otherwise feel free to revert to me.

answered May 3, 2018 by Cloud gunner
• 4,280 points

selected Aug 6, 2018 by Priyaj
+1 vote

To allow user ec2-user (Amazon AWS) write access to the public web directory (/var/www/html),
enter this command via Putty or Terminal, as the root user sudo:

chown -R ec2-user /var/www/html

Make sure permissions on that entire folder were correct:

chmod -R 755 /var/www/html

Doc's:

Setting up amazon ec2-instances

Connect to Amazon EC2 file directory using Filezilla and SFTP (Video)

Understanding and Using File Permissions

answered Aug 3, 2018 by Priyaj
• 57,300 points
Doing above logged me out of my VM machine, Now i can't log in.
Please help
What error message does it give when you try to log in?

Related Questions In AWS

0 votes
1 answer

Permission Denied: AWS EC2 FTP

This is a permission issue. You can ...READ MORE

answered Mar 28 in AWS by Kolki
170 views
0 votes
1 answer

AWS ssh access permission denied (public key issue)

For Ubuntu Instance, First, check whether you have ...READ MORE

answered May 13 in AWS by sunshine
• 1,240 points
327 views
0 votes
0 answers
0 votes
1 answer
0 votes
1 answer

Deploy Docker Containers from Docker Cloud

To solve this problem, I followed advice ...READ MORE

answered Sep 3, 2018 in AWS by Priyaj
• 57,300 points
270 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,380 points
264 views
+1 vote
3 answers

Not able to pass params POST to AWS Lambda from Amazon API Gateway

For this template : application/x-www-form-urlencoded  This line below will ...READ MORE

answered Jun 13, 2018 in AWS by Cloud gunner
• 4,280 points
2,525 views