Mkdir cache directory permission denied @ php-fpm (chmod 777 needed)
-
[Wed Aug 24 22:33:11.646378 2016] [proxy_fcgi:error] [pid 27151:tid 140315952400128] [client 82.72.97.64:55882] AH01071: Got error ‘PHP message: All-in-One Event Calendar: mkdir(): Permission denied @ /home/xxx/domains/xxx.nl/public_html/wp-content/plugins/all-in-one-event-calendar/vendor/twig/Environment.php:1243 #2\nPHP message: All-in-One Event Calendar: mkdir(): Permission denied @ /home/xxx/domains/xxx.nl/public_html/wp-content/plugins/all-in-one-event-calendar/vendor/twig/Environment.php:1243 #2\nPHP message: All-in-One Event Calendar: mkdir(): Permission denied @ /home/xxx/domains/xxx.nl/public_html/wp-content/plugins/all-in-one-event-calendar/vendor/twig/Environment.php:1243 #2\nPHP message: All-in-One Event Calendar: mkdir(): Permission denied @ /home/xxx/domains/xxx.nl/public_html/wp-content/plugins/all-in-one-event-calendar/vendor/twig/Environment.php:1243 #2\n’
Check this following code, php-fpm don’t need chmod 777:
$dir = dirname($file);
if (!is_dir($dir)) {
if (false === @mkdir($dir, 0777, true) && !is_dir($dir)) {
throw new RuntimeException(sprintf(“Unable to create the cache directory (%s).”, $dir));
- The topic ‘Mkdir cache directory permission denied @ php-fpm (chmod 777 needed)’ is closed to new replies.