Wednesday, September 27, 2023
 Popular · Latest · Hot · Upcoming
rated 0 times [  15] [ 0]  / answers: 1 / hits: 16049  / 2 Years ago, thu, august 19, 2021, 7:45:54

i have install lampp 1.8.1 in /opt/lampp.Everything is working fine.

i added my current user as owner to the htdocs folder so that i can write to htdocs folder.

then i created my symfony2 project. everything worked fine and i was able to run the configuration page properly.

but when i cleared the cache using command

sudo php app/console cache:clear --env=prod
sudo php app/console cache:clear --env=dev

the cache gets cleared but then there is permissions issue. when i try to access the same configuration page as before it gives me an error in browser:

" RuntimeException: Failed to write cache file

but then when i change the permissions of the cache folder again using :

sudo chmod -R 777 app/cache

the page is again displayed properly

I dont want to change permissions everytime after clearing the cache.
Is there a solution or am i doing something wrong?

More From » 12.10


See "Setting up Permissions" in
My preferred way in Ubuntu is setfacl, it works (just need to install a package first time):

sudo setfacl -R -m u:www-data:rwX -m u:`whoami`:rwX app/cache app/logs
sudo setfacl -dR -m u:www-data:rwx -m u:`whoami`:rwx app/cache app/logs

[#32554] Friday, August 20, 2021, 2 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.

Total Points: 435
Total Questions: 111
Total Answers: 109

Location: Angola
Member since Tue, May 5, 2020
3 Years ago
singerrupt questions