Back

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

Using Filezilla, I am able to successfully connect to the EC2 instance I created. ec2-user is the username and when I tried to transfer the war file to tomcat, this is the error i receive:

/var/lib/tomcat6/webapps/RealEstateERP.war: open for write: permission denied Error: File transfer failed.

I also changed the permission of the folder to test it out, but still no solution. Please help.

1 Answer

0 votes
by (44.3k points)

The issue here is, only the root user has the permission to write in the given folder. So, as ec2-user you cannot do that. 

1. The simplest solution is to copy the same war file to the /home/ec2-user folder and then ssh into the instance and copy the file from your home directory to /var/lib/tomcat6/webapps/

cp -i WARfilename.war /var/lib/tomcat6/webapps

2. The other solution but not suggested is to SSH into the instance, go to the tomcat6 directory and change the permission of the webapps directory:

sudo chmod 777 webapps

Once this is done, and the permissions are changed, you can copy the file directly from Filezilla as the ec2-user.

Also, Learn AWS completely from out informative tutorial and if you need more insights about AWS, then check out our AWS course page.

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

Browse Categories

...