title: File permissions for a JavaScript file
body: <p>I have the following directory structure:</p>
  
  <blockquote>
    <p>var/www/example.com/public_html/index.html
    var/www/example.com/public_html/images/example.jpg
    var/www/example.com/public_html/javascript/example.js</p>
  </blockquote>
  
  <p>I ran the following file and directory permissions command:</p>
  
  <pre><code>chmod -R 755 var/www/example.com/public_html
  </code></pre>
  
  <p>So, all of the above files have <code>755</code> permissions, i.e. <code>-rwxr-xr-x</code> (I've confirmed this via FileZilla).</p>
  
  <p>From my browser I can navigate to <code>index.html</code> and to <code>example.jpg</code>. However, when I navigate to <code>example.js</code> , I get a 404 error).</p>
  
  <p>The way I discovered this was that my <code>index.html</code> wasn't executing javascript. So <code>index.html</code> can't see <code>example.js</code> either.</p>
  
  <p>What could be causing this?</p>
  
  <p>Update: On localhost, index.html executes the javascript file fine. All this is happening on the remote server.</p>
  
  <p>[SOLVED] -- after following this comment below, <a href="https://stackoverflow.com/questions/28843584/file-permissions-for-javascript-file-solved#comment45956633_28843584">File permissions for a JavaScript file</a> it still didn't work. I think the server wasn't updating / refreshing properly for some reason. So I then changed the name of the javascript folder to js, and updated index.html accordingly, and then miraculously everything worked.</p>