Chmod () operation not allowed - FatFree framework

I am developing an application in the FatFree framework, and now I am trying to deploy it to a server. Everything seems to be fine when I run it on the local host.

However, when I deployed it to the server and tried to access it, it gives me a strange error, which is -

Internal Server Error chmod(): Operation not permitted #0 /var/www/webapp/inc/main.php:62 Template::serve('front_page.php') #1 /var/www/index.php:65 F3::run() 

I gave 777 permissions to the webapp folder, so chmod() should be allowed. The above indicates an error front_page.php while servicing the template file front_page.php .

How can i fix this?

+4
source share
4 answers
+2
source

To do this, you must grant permissions recursively using -R for your "webapp" folder

+7
source

Siddhart refers to the correct answer in the comments:

F3 compiles templates in temp / dir before serving. This temporary dir must: a) exist and b) have the appropriate permissions.

To achieve this, go to the directory where the template file is located and run:

 mkdir temp/ chown www-data temp 
+4
source

You can add write permissions for the web server to your [fatfree-web-root-dir]. Unsafe!

 chmod o+w fatfree-web-root-dir # Then web-server can create "temp" folder. 

Another way: you have to create the "temp" directory with the web server owner:

 mkdir fatfree-web-root-dir/temp chown www-data:www-data fatfree-web-root-dir/temp # www-data - in Debian for example 
+2
source

Source: https://habr.com/ru/post/1402217/


All Articles