If you have aws instance virtual web server and it is running. Also want to transfer/upload files on ec2 aws web server using filezilla. So, you have Filezilla connected to the AWS server but when you try to move the files from my local machine to the /var/www/html directory on apache 2 aws, it displays permission denied.
You can see Amazon AWS Filezilla transfer permission denied error on following image:
So, in this post, we will show you simple way to enable the permission of your aws apache 2 ubuntu user. And you can easily transfer/upload file using filezilla on amazon aws apache 2 ubuntu web server without error.
Solution 1 – AWS Ubuntu – Enable File Transfer permission denied Filezilla
First of all, you need to connect your aws ec2 instance from ssh terminal. If you are new to connect aws ec2 instance with windows, ubuntu and mac system. So you can read this tutorial “How to Connect to ec2 Instance From Putty and SSH Terminal“ to connect your ec2 instance from ssh. Otherwise you can see the how to enable write for permission denied.
Now, you can use the following command to enable write access to the public web directory (/var/www/html).
Important note, different types of users contain different user names for the Amazon AWS instance virtual web server. You can see the following table:
- Amazon – ec2-user
- Centos – centos
- Debian – admin or root
- Fedora – ec2-user
- RHEL – ec2-user or root
- SUSE – ec2-user or root
- Ubuntu – ubuntu or root
Now, connect your aws instance with ssh terminal. Then type the following command:
Aws centOs User
sudo chown -R centos:centos /var/www/html sudo chmod -R 755 /var/www/html
Aws Ubuntu User
sudo chown -R ubuntu:ubuntu /var/www/html sudo chmod -R 755 /var/www/html
AWS Amazon ami User
sudo chown -R ec2-user:ec2-user /var/www/html sudo chmod -R 755 /var/www/html
After that, type the following command on your ssh terminal:
chmod -R 755 /var/www/html
Thanks for reading this post, we hope this post is helpful for as to enable write permission on /var/www/html directory in aws virtual web server.