Fatal error: $CFG->dataroot is not writable,

Fatal error: $CFG->dataroot is not writable,

by Shahroon Saleem -
Number of replies: 6

Fatal error: $CFG->dataroot is not writable, admin has to fix directory permissions! Exiting. is the error that I got once I transferred from linux to windows hosting.


my config.php says something like this

==

$CFG->dataroot  = 'E:lms-cped\moodledataCPED';
$CFG->admin     = 'admin';

$CFG->directorypermissions = 0777;

require_once(__DIR__ . '/lib/setup.php');

===

I checked permissions using file zila for the directory moodledataCPED, it has all ticks to the read/write and execute.


I have placed the moodledataCPED on the main directory while the site runs from

abc.com/test 


Please clarify.

Average of ratings: -
In reply to Shahroon Saleem

Re: Fatal error: $CFG->dataroot is not writable,

by Usman Asar -
Picture of Plugin developers Picture of Testers

Shahroon, give write permission to IUSR on your dataroot folder and you're done.

In reply to Usman Asar

Re: Fatal error: $CFG->dataroot is not writable,

by Shahroon Saleem -
I have given the write permission to IUSR, but now it goes a blank page at firefox and when I open the link at chrome , it shows the error as

the site is currently unable to handle this request.
HTTP ERROR 500

In reply to Shahroon Saleem

Re: Fatal error: $CFG->dataroot is not writable,

by Usman Asar -
Picture of Plugin developers Picture of Testers

Blank pages shows corrupted caches which normally are rectified by deleting cache folders and refreshing pages, where 500 error is concerned, undoubtedly PHP issue, there  must be something not configured properly in PHP.

In reply to Shahroon Saleem

Re: Fatal error: $CFG->dataroot is not writable,

by RTR Admin -

Try changing the permission to 0755. Not all servers allow the God permission (777), some max out at 755 for security purposes.

In reply to RTR Admin

Re: Fatal error: $CFG->dataroot is not writable,

by Shahroon Saleem -

In config.php file i did this


$CFG->directorypermissions = 0755;


Still the blank page at firefox....


at chrome

==

This page isn’t working

lms.cped.uettaxila.edu.pk is currently unable to handle this request.

HTTP ERROR 500
==

Any suggestions? I am transferring the moodle installation from linux based server to IIS based one and facing such issues...

Also can somebody please tell, how to confirm if the database connection has been established...I need to get to the roots of this issue

In reply to Shahroon Saleem

Re: Fatal error: $CFG->dataroot is not writable,

by RTR Admin -

Sorry for this understanding. Changing the permissions in the config file do not actually change the permissions on the folder. The number displayed in the config file is reflective of what the permissions should be set at. You need to change the permission on the folder where your dataroot is set ...'E:lms-cped\moodledataCPED';