title: Apache Webserver - How to write to dir/files with permissions set at 755 instead of 777
body: <p>I just learned to install Apache 2 on my ubuntu linux localhost for the first time.  I'm making it work with PHP5.</p>
  
  <p>I noticed that anytime I want to write to a file or directory, I have to chmod 777 the destination.</p>
  
  <p>But from my experience working on 3rd party hosting solutions, I am generally allowed to write to files and dirs that have 755 permissions.</p>
  
  <p>What can I do on my localhost so that I can write to files and dirs with 755 permissions?  If the answer to this is very long, can someone send me a link to a step by step guide to do this?</p>