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!

UPDATE: A screenshot from it 

enter image description here

May 3, 2018 in AWS by Flying geek
• 3,280 points

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,660 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


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
• 58,100 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, 2019 in AWS by Kolki
+1 vote
1 answer

AWS ssh access permission denied (public key issue)

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

answered May 13, 2019 in AWS by sunshine
• 1,280 points
0 votes
0 answers

transfer the ownership of Amazon S3 objects from one AWS account to another

I want to transfer the ownership of ...READ MORE

Oct 9, 2019 in AWS by Hannah
• 18,570 points

closed Oct 9, 2019 by Kalgi 444 views
0 votes
1 answer

error: aws login 'Permission denied (publickey)'

Hi@akhtar, You need to set the permissions for ...READ MORE

answered Sep 21, 2020 in AWS by MD
• 95,380 points
+2 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
• 58,100 points
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
+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,660 points
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP