Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

AWS Opsworks Java App Server 403 Error

I am a newbie to AWS Opsworks. I am trying to deploy the simplest of AWS Opsworks Application using Java App Server, by following this: http://java.awsblog.com/post/Tx1QG3W2M969014/AWS-OpsWorks-for-Java

I did everything as mentioned but when I deploy and try to view the URL, it says: Forbidden You don't have permission to access /JavaBasic/HelloWorldService.jsp on this server.

Can someone guide me to how I should resolve this?

like image 499
Anan Avatar asked Feb 17 '26 16:02

Anan


1 Answers

From what I remember seeing in the Apache documentation, you need to change the permissions for the file, so everyone -- even not-logged-in users -- can see it. That way, you can access it through a browser, since that's a loginless connection.

The following command should do the trick:

sudo chmod -R  755 /path/to/www

Where /path/to/www is the absolute path, from the root, to the topmost directory of the files on the website. Using Apache2, it seems like it'll be /var/www, though it may be different for you.

Note that you'll have to have the password for the root account for sudo to work; if you don't, try it without and it might still.

EDIT: After a good bit of research, I determined that you only need to give the www-data user permission to see the pages, since that's what Apache uses. Setting the permission to 755 will do this, but any solution that gives www-data the ability to read the file will do the same thing. For example, this would also work, assuming Apache uses www-data:

sudo chown -R www-data /path/to/www

Again, /path/to/www should be the absolute path to the root of your website, and you'll need the password for the root account.