Explore Courses Blog Tutorials Interview Questions
0 votes
in AWS by (19.1k points)

I have my instance of the Amazon AWS running, the test page is up.

I am trying to SFTP the files to the server to display 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 can 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, permission denied.

1 Answer

0 votes
by (44.3k points)

If you want write access to the public web directory (/var/www/html) for an ec2-user, then enter this command in the Ubuntu terminal which is open on PuTTY:

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

Also, you have to provide permissions for the final directory (/html) and also the complete directory:

chmod -R 755 /var/www/html

Related questions

0 votes
1 answer

Want to get 50% Hike on your Salary?

Learn how we helped 50,000+ professionals like you !

0 votes
1 answer
0 votes
1 answer
0 votes
1 answer
asked Jul 31, 2019 in AWS by yuvraj (19.1k points)
Welcome to Intellipaat Community. Get your technical queries answered by top developers!

28.4k questions

29.7k answers


94k users

Browse Categories