Unable to write cache

17,997

See this link:

Configuration and Setup

It's pretty common issue. You need to configure permissions though ACL...

Share:
17,997
ramiromd
Author by

ramiromd

Software Developer ?

Updated on June 04, 2022

Comments

  • ramiromd
    ramiromd almost 2 years

    Hi all im working with Symfony2. I dont have problems with the project in my computer but when i upload the files in the web server, fails for cache permissions.

    I set the permissions in my computer with this steps:

    $ rm -rf app/cache/*
    $ rm -rf app/logs/*
    $ APACHEUSER=`ps aux | grep -E '[a]pache|[h]ttpd' | grep -v root | head -1 | cut -d\  -f1`
    $ sudo setfacl -R -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs
    $ sudo setfacl -dR -m u:$APACHEUSER:rwX -m u:`whoami`:rwX app/cache app/logs
    

    As sugest The Doc. So, upload the app/cache and app/logs (empty) folders to my webserver. Whe in try access to the web project, Symfony says:

    Fatal error: Uncaught exception 'RuntimeException' with message 'Could not create cache directory "/home/coleman/public_html/apps/app/cache/prod/annotations"

    I check the folder with Filezilla, and the permissions are 666 (read and write for all). I dont know that are wrong.

    Any ideas ?.