That pesky Data Folder

I see this topic mentioned a few times in various places.  But I will raise it again, because this has totally stopped me dead when trying to install Elgg.

I have my own server, and have root control on it.  I install Elgg in a web-accessible folder eg: .../name/httpdocs/ and create the Data Folder at .../name/data/   All trailing slahes intact.  Data folder has chmod of 777 (confirmed seventeen times by shell access, by remote FTP client, etc.  Believe me, the Data Folder is indeed 777). 

The Elgg install process eventually asks me for the System Settings.  The full path is automatically displayed as .../name/httpdocs/  and I type the full path to the Data Folder as .../name/data/ (yes with trailing slash).

Without fail, the install then stops dead, saying "Your data directory .../name/data/ is not writable".

Does anyone know of a tweak I can apply to get over this roadblock?  Any similar experiences?  Any suggestions?

  • Hi fstieglitz,

    I haven't seen this problem before. I would recommend to try with another version of Elgg, like the latest SVN release or version 1.5.

    Regards,
    Uddhava dasa

  • I have had this problem several times with Fedora Linux. The problem is that SELinux won't let PHP applications write to files by default (regardless of their permissions). You either need to configure SELinux properly or turn it off all together.

  • @all
    we have dedicated, centos, selinux ?
    but not such problems..
    however if you want to turn of selinux
    you can login as root and
    type this command
        echo 0 >/selinux/enforce
    my 5 cent's worth ;-)

    however...
    be warned, I quote from another linux expert here --

    " Be aware that by disabling SELinux you will be removing a security mechanism on your system. Think about this carefully, and if your system is on the Internet and accessed by the public, then think about it some more. Joshua Brindle (an SELinux developer) has comments on disabling SELinux, which states clearly that applications should be fixed to work with SELinux, rather than disabling the OS security mechanism.

    You need to decide if you want to disable SELinux temporarily to test the problem, or permanently switch it off. It may also be a better option to make changes to the policy to permit the operations that are being blocked - but this requires knowledge of writing policies and may be a steep learning curve for some people. "

  • Thanks to all for the good info.  I will dig around and report back.

    Just for the record, I seem to be running centos-5-x86_64

  • I have a similar almost similar problem. I use plesk on ubuntu 8.04 LTS and i was trying to install elgg inside httpdocs and have /data/ directory at the same level as httpdocs. With all settings right it still said the /data/ directory was not writable.

    I decided to install elgg inside /httpdocs/elg/ and place /httpdocs/data/, this is working but the problem is that /data/ directory is at the mercy of the hacker.

    Is there a way to use a .htaccess file to keep out sniffers while allowing data to be written?

    I mean the correct way to write the .htaccess file.

  • hmm.. Plesk sometimes seems to be "temperamental". We migrated from LXA to Plesk a few months back and had to relearn everything in order to get our multiple websites up and running. It took us 2 weeks full-time to plan and prepare for the actual night of the migration. I guess we either got lucky or hit the correct learning curve. It finally took the total migrate of about 20GB of 6 large elgg-based websites approx 3 hours. We're happier now except when our list of tasks-to-do grows to 40-50 items ;-(

  • How do i write the .htaccess file to protect the file without denying permision to users data rw-x?

  • Uddhava dasa suggested I use an older version of Elgg.

    Well... It is probably right under my nose, but, I just can not find where previous versions are provided.  Any thoughts?

    As I gear up to try some of the suggestions in this thread, what is the accepted process to loop this "Data Folder is not writeable even though it shows as 777" issue back to the Elgg developers, so a future version can smooth things out.

  • Installing a different version of Elgg won't make a difference. You have a configuration problem with your server. Do you have open_basedir set to something in your php.ini?