title: How should I set up permission for Rails app?
body: <p>Currently I set <code>0777</code> to all the directories and files.<br>
  However, I'm scared of being accessed from others.<br>
  Log files and all the controllers, models, views, and the files in config are set to <code>0777</code></p>
  
  <p>In general, how they are supposed to be set?</p>
  
  <ul>
  <li>Log files directory and its files</li>
  <li>controller files</li>
  <li>model files</li>
  <li>view fies</li>
  <li>the files in config directory</li>
  </ul>