Your data directory...is not writable

I finally started to install Elgg on a production server but the installer throws a wobbly with the following message:

"Your data directory /home/*****/*****.org/pvtdata/ is not writable"

I checked that the data directory is writable (777).

Elgg resides in /home/*****/*****.org/htdocs/

Any useful tips or clues are welcome. Thanks.

  • That link points out a way to mask the problem. It seems that you still have the problem of where to put your data directory.

  • You could be correct, Cash, as I can't seem to upload anything. However, at least Elgg is running for now. I searched high and low for a solution and while there seem to be plenty of people with the same problem there doesn't seem to be a fix.

  • Just a thought - perhaps the data directory does not exist. Go into your datalist table and look at the path for your elgg install. Compare that to the path you entered as your data path.

  • Cash, the data dir does indeed exist. The path set in the Elgg Admin Panel points to the correct dir too. I double checked it in the generated Elgg diagnostic report and that seems fine too. Anywhere else I can check?

  • Just as a test I created htdocs/data/ and it uploads just fine to that. If the dir is above htdocs then it won't play.

  • All Elgg is doing is using the php function is_writable() to determine whether the http server has permissions to the directory. http://us3.php.net/is_writable

    This kind of thing is very server specific because it depends on the permissions of directories and what user the http server is running under. It is also quite possible your server is setup to run php in safe mode: http://us.php.net/manual/en/ini.sect.safe-mode.php

    You'll need to contant the administrator of your server.

  • Cash,

    Better late than never I guess...a new host solved the problem. Thanks!

  • I suspect that this is down to an openbasedir restriction. A quick fix if you are impatient and not working on a production installation is just to comment out line 33 & 34 of /actions/systemsettings/install.php to read 

    /* That it's valid

    if (stripos($dataroot, $path)!==false)

    throw new InstallationException(sprintf(elgg_echo('InstallationException:DatarootUnderPath'), $dataroot));

    */

  • I make Cowlex tipps. I got next message:
    "Cache path set to nothing! "
    I tried elgg-1.7.14.

    But the elgg 1.8.1 is work.

  • Success. I commented this:

    "// Check data root is writable
    > if (!is_writable($dataroot))
    > throw new
    > InstallationException(sprintf(

    elgg_echo('InstallationException:DatarootNotWritable'),
    > $dataroot));"