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

The error I am getting is

Volt directory can't be written

#0 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compileFile('/home/derandi/P...', '/home/derandi/P...', false)
#1 [internal function]: Phalcon\Mvc\View\Engine\Volt\Compiler->compile('/home/derandi/P...')
#2 [internal function]: Phalcon\Mvc\View\Engine\Volt->render('/home/derandi/P...', Array, true)
#3 [internal function]: Phalcon\Mvc\View->_engineRender(Array, 'index/index', true, true, NULL)
#4 [internal function]: Phalcon\Mvc\View->render('index', 'index', Array)
#5 /home/derandi/Project/Kursus/Website/test1/public/index.php(37): Phalcon\Mvc\Application->handle()
#6 {main}


1.7k
Accepted
answer

Try to chmod it to 777 and see if that help



60.9k

with which user is your php runing ? if its www-data and you (derandi) is the owner of the files, you can 664 the folder and the files.

http://www.onlineconversion.com/html%5chmod%5calculator.htm

ll voltcompiledirectory

ll volt/
total 260
drwxrwxr-x  2 izo www-data  4096 Jan 20 23:08 ./
drwxrwxr-x 16 izo www-data  4096 Jan 17 09:38 ../
-rwxrwxr-x  1 izo www-data    14 Oct 14 08:09 .gitignore*
-rwxrwxr-x  1 izo www-data  1108 Jan 22 10:56 %%var%%www%%......%%cli%%emails%%common%%_footer.volt.php*
-rwxrwxr-x  1 izo www-data  4324 Jan 21 14:56 %%var%%www%%.....%%cli%%emails%%order%%invoice.volt.php*

and i am uploading my files with "izo" user. so my izo user needs to be able to write on those files. so the owner has to be 6. now in order your php to be able to re-create the template file it needs to be 6 also, and for others ( the 3rd number ) whatever you deside.

Try to chmod it to 777 and see if that help

thanks :D its working now

with which user is your php runing ? if its www-data and you (derandi) is the owner of the files, you can 664 the folder and the files.

http://www.onlineconversion.com/html%5chmod%5calculator.htm

ll voltcompiledirectory

``` ll volt/ total 260 drwxrwxr-x 2 izo www-data 4096 Jan 20 23:08 ./ drwxrwxr-x 16 izo www-data 4096 Jan 17 09:38 ../ -rwxrwxr-x 1 izo www-data 14 Oct 14 08:09 .gitignore* -rwxrwxr-x 1 izo www-data 1108 Jan 22 10:56 %%var%%www%%......%%cli%%emails%%common%%_footer.volt.php* -rwxrwxr-x 1 izo www-data 4324 Jan 21 14:56 %%var%%www%%.....%%cli%%emails%%order%%invoice.volt.php*

```

and i am uploading my files with "izo" user. so my izo user needs to be able to write on those files. so the owner has to be 6. now in order your php to be able to re-create the template file it needs to be 6 also, and for others ( the 3rd number ) whatever you deside.

thanks Izo :D i have fix the problem

Izo posted a better solution. Setting chmod 664 is much more secure than giving all permission to everybody. Be aware of setting 777 chmods

with which user is your php runing ? if its www-data and you (derandi) is the owner of the files, you can 664 the folder and the files.

http://www.onlineconversion.com/html%5chmod%5calculator.htm

ll voltcompiledirectory

``` ll volt/ total 260 drwxrwxr-x 2 izo www-data 4096 Jan 20 23:08 ./ drwxrwxr-x 16 izo www-data 4096 Jan 17 09:38 ../ -rwxrwxr-x 1 izo www-data 14 Oct 14 08:09 .gitignore* -rwxrwxr-x 1 izo www-data 1108 Jan 22 10:56 %%var%%www%%......%%cli%%emails%%common%%_footer.volt.php* -rwxrwxr-x 1 izo www-data 4324 Jan 21 14:56 %%var%%www%%.....%%cli%%emails%%order%%invoice.volt.php*

```

and i am uploading my files with "izo" user. so my izo user needs to be able to write on those files. so the owner has to be 6. now in order your php to be able to re-create the template file it needs to be 6 also, and for others ( the 3rd number ) whatever you deside.