You got an account on a server for a class. You created a public_html directory, and set the permissions on it. What do you do if it does not work?
Check the console for problems
For example, under Firefox, select these from the drop-down menu:
Tools - Web Developer - Web Console
You will see some diagnostic stuff on the page, either under the page content,
or possibly to the side. Make sure it is on the "console" (between Inspector
and Debugger).
This should give you usedul information, and often indicates which line
in what file has the problem. You might have a simple html page all in one
file, or you might have a page that calls in many resources, such as
javascript pages. This should help you track down which line in which file
is causing the error.
First, check the permissions to make sure the world can read it. In this case, we can see another graphics file in that directory. The permissions are 644 (read/write for owner, read for group, read for world), which looks fine. The permissions for the public_html directory are fine, too: r-x for world. In fact, the permissions appear to be the same for both PNG files. So why can we see one but are forbidden access to the other?
The machine runs CentOS, which supports extended permissions. This is relevant because another server I am work with (running MacOS) does not, and the commands below do not work on it. It also did not give me this problem.
[public_html]$ ls -lZ [Pp]ounce*
-rw-r--r--. username username unconfined_u:object_r:httpd_user_content_t:s0 Pounce2.png
-rw-r--r--. username username unconfined_u:object_r:user_home_t:s0 Pounce.png
See how "Pounce.png" has the attribute "user_home_t" instead of "httpd_user_content_t"? That's the problem. Even though the file is under the public_html directory, and the rwx permissions are correct, the server is blocking access to the file.
The users can run "chcon" to fix this, or the systems administrator can run it. This appears to fix the problem: