Love Fuel?    Donate

FuelPHP Forums

Ask your question about FuelPHP in the appropriate forum, or help others by answering their questions.
CacheDir not writable
  • Hey there,

    i've got some serious trouble with my fuel installation.
    It a centos machine with apache and mysql.
    I extracted the git project files into /usr/share/sd
    executed php oil refine install and it says all dir are writable
    but everytime i am trying to access, it says "Fuel\Core\FuelException [ Error ]: Cache directory does not exist or is not writable."

    i chmodded the whole dir and chgrp/ownd it to apache
    but no matter what. it doesnt work.
    it drives me crazy.

    what are  i am doing wrong?
    thank you in advance
  • Problem solved.

    Centos usercontext is a bitch.
    It was not set to permit httpd r/w access.
  • i also come across this problem,how do you resolve the problem?
  • Do you get it when you run an old task, or when you request a web page?

    If the first case the user you logged on as doesn't have write access, in the second case the user the webserver runs as doesn't have write access.

    I usually solve this on Linux using a group, of which both the web user and the commandline user are a member. You can then do:

    cd /where/ever/your/fuel/app/is
    chgrp <groupname> . -R
    find . -type f -exec chmod 2660 {} \;
    find . -type d -exec chmod 2770 {} \;

    Note that this removes all world rights, and gives the webserver write rigths everywhere.

    If you don't want that, the alternative is:
    cd /where/ever/your/fuel/app/is
    chown <yourname><yourgroup> . -R
    find . -type f -exec chmod 2640 {} \;
    find . -type d -exec chmod 2750 {} \;
    chmod 2660 fuel/app/logs -R
    chmod 2660 fuel/app/cache -R
    chmod 2660 fuel/app/tmp -R

    Which gives your user write rights everywhere, and have the webserver use world rights, which are read-only by default, and changes the world rights to write for logs, cache, and tmp.

    note that if logs/cache/tmp already contain folders, you need to run a find there as well, as you need to set different permissions on folders and on files.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion