Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Volt directory can't be written

hi! when I try to access the route organizacional/puestos/partials
should show a template made with volt but throws me this error

Warning: fileputcontents(/var/www/html/phalcon/public/../Volt/varwwwhtmlphalconpublic..appsOrganizacionalViewsindex.phtml.php): failed to open stream: Permission denied in /var/www/html/phalcon/bootstrap.php on line 95 PhalconException: Volt directory can't be written

I have fedora but it actually works on Mac OSX

can someone help me??

It happens because Volts engine tries to create some files based on your template ones, but it can't due to permission restritictions.

Change your views directory permissions to 777 and apply to enclosed files and folders and try again. I don't know if adding 777 permissions to this folder/files is a good practice (probably not), but for development environment it will solve your issue.



23.6k

yeah i put the permissions to 777 before post ; but the error still appears



82.7k

hi, Does this directory /var/www/html/phalcon/public/../Volt/ exists and is it writable?

ls /var/www/html/phalcon/public/../Volt/


23.6k
Accepted
answer

thanks i resolved the error, it was the selinux



33.1k

Hi I am use ubuntu, i solve problem sudo chown -R www-data:www-data mvc/app/cache/



1.1k

chmod -R a+w app/cache

chmod -R a+w app/cache works for me and I don't think giving 777 permission to views folder is a good idea.

Change volt file permission (Inside app/cache) to 777 .Its working fine.



60

Change volt file permission (Inside app/cache) to 777 .Its working fine. OK,I use this way to handle my problem.It works.Thank You.But i really want to know why???my Email address is [email protected] am waiting for you