-1

I am trying to fix a problem I have with my program I uploaded to AWS in elastic beanstalk tomcat. I found someone who seems to have had a similar problem, but I can't find where I execute their solution.

AWS EC2 tomcat permission denied creating/writing to file

The answer said that I should use the following commands:

    chmod o+x /home    chmod o+x /home/ec2-user

I want to see if this will fix my problem, however I have looked everywhere and have found no information regarding where I actually put these commands.

askedApr 7, 2017 at 16:15
Dane Williams's user avatar

1 Answer1

0

Is your problem fixed if you run those commands manually? (i.e.eb ssh into your instance and thensudo chmod o+x /home thensudo chmod o+x /home/ec2-user)

If so, you could automate running those commands using an EB extension file. The documentation ishere but it would look something like this:

.ebextensions/01-fix-permissions.config

commands:  fix_home_permissions:    command: "chmod o+x /home"  fix_ec2user_permissions:    command: "chmod o+x /home/ec2-user"
answeredApr 7, 2017 at 18:10
Brian's user avatar
Sign up to request clarification or add additional context in comments.

11 Comments

After reading through some more documentation here is my understanding of one way I could set up and include those commands. Add a folder called .ebextensions in my maven project in eclipse. Create a .config file and put it in this folder. Run maven install to get the .war file and then update my AWS web app with the new file.
Yes, if you create.ebextensions/01-fix-permissions.config and then deploy your WAR it should do what you want.
I tried uploading my war file as I previously described and am still getting the same error. Does the .war not include these changes? Do I need to create a .zip instead to include them?
Update: tried as a .zip and also have the same error
If you run thechmod commands manually, does your original problem go away? If so, please post your/var/log/eb-activity.log.
|

Your Answer

Sign up orlog in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

By clicking “Post Your Answer”, you agree to ourterms of service and acknowledge you have read ourprivacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.