Troubleshooting: Error 403 - Forbidden

You test the URL in your browser and encounter Error 403 - Forbidden.

This is typically caused by a file permission problem on a UNIX platform. If your static content is stored in the Java EE application, file permission is controlled by the Application server. When performing application updates, files with particular extension are set read and execute permission to everyone. If your static content does not have a standard file extension, the application server may not set the file permission correctly.

You can also get this problem due to file permissions of the directories in the path to the file. The Web server needs access to the static content and all parent directories to serve the static Web content such as HTML or images. Each directory in the path to the directory must have read and execute permissions for the user running the Web server. To correct the problem, ensure that each directory in this path has file permission 755. You can set the file permission using the following commands for the example path listed above.


chmod 755 /opt
chmod 755 /opt/IBM
chmod 755 /opt/IBM/WebSphere
chmod 755 /opt/IBM/WebSphere/AppServer
chmod 755 /opt/IBM/WebSphere/AppServer/profiles
chmod 755 /opt/IBM/WebSphere/AppServer/profiles/demo
chmod 755 /opt/IBM/WebSphere/AppServer/profiles/demo/installedApps
chmod 755 /opt/IBM/WebSphere/AppServer/profiles/demo/installedApps/WC_demo_cell
chmod 755 /opt/IBM/WebSphere/AppServer/profiles/demo/installedApps/WC_demo_cell/WC_demo.ear

If this still does not solve your problem, you may have some access control in the Web server configuration file that prevents certain files or file types from being served. Check your configuration for any directives that restrict access to files such as Deny or Allow directives.