title: Moodle install on hosted linux: $CFG->dataroot is not configured properly, directory does not exist or is not accessible! Exiting
body: <p>I install (by Git) Moodle on hosted site and succesfully run <code>php /path/to/moodle/admin/cli/install.php</code> (which created dataroot directory as <code>/home/my_user/moodledata</code> and set it in <code>config.php</code>)</p>
  
  <p>But when I try to open web, error appears:</p>
  
  <pre><code>$CFG-&gt;dataroot is not configured properly, directory does not exist or is not accessible! Exiting.
  </code></pre>
  
  <p>Rights for folder are 777.</p>
  
  <p>Any help?</p>
  
  <p>Edit: -------------------------------------------------------------</p>
  
  <pre><code>$d = dir(getcwd());
  
  echo "Handle: " . $d-&gt;handle . "&lt;br&gt;";
  echo "Path: " . $d-&gt;path . "&lt;br&gt;";
  
  $d-&gt;close(); 
  </code></pre>
  
  <p>I put these lines above in <code>config.php</code> and discover, that real path is not <code>/home/my_user/moodledata</code> but <code>/nfsmnt/hosting1_1/c/6/c69f848b-e898-4268-be47-11de7fa8e5ac/my_user/moodledata/</code></p>
  
  <p>So I do a little hack to dataroot definition:</p>
  
  <pre><code>$CFG-&gt;dataroot = getcwd().'/../../moodledata';
  </code></pre>
  
  <p>And home page is open (but no css). Unfortunatelly any other page (like login) do not work.</p>