StevenBork Posted July 3, 2018 Share Posted July 3, 2018 Hey guysI'm having some strange permission issues using PHP-FPM and WHMCS on a CentOS 6.x 64 bit server.In particular, I got this message: Code: Permissions Error The templates compiling directory '/var/www/mysite.com/templates_c' must be writeable (CHMOD 777) before you can continue. If the path shown is incorrect, you can update it in the configuration.php file. The only way I can get rid of this issues is chmod 777 to /var/www/mysite.com/templates_cBut, that's insecure, we all know that, right?The strange thing is:I'm running PHP-FPM, with their own user, so... 777 shouldn't be necessary, only 755 should be enough. See my current php-fpm configuration for this site: Code: [mysite.com] listen = 127.0.0.1:9010 listen.allowed_clients = 127.0.0.1 listen.owner = nginx listen.group = nginx listen.mode = 0666 user = mysiteuser33 group = mysiteuser33 pm = dynamic pm.max_children = 80 pm.start_servers = 15 pm.min_spare_servers = 15 pm.max_spare_servers = 35 request_terminate_timeout = 600 php_admin_value[error_log] = /var/log/php-fpm/error.log php_admin_value[session.save_path] = /tmp php_admin_flag[log_errors] = on php_admin_value[open_basedir] = /var/lib/php/session:/tmp:/var/www/mysite.com:/var/www/updater_tmp_dir/ php_admin_value[memory_limit] = 128M Code: [root@server.mysite.com:~]finger mysiteuser33 Login: mysiteuser33 Name: Directory: /var/www/ Shell: /bin/bash Never logged in. No mail. No Plan. Any ideas?Appreciate your help.Thanks 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Marcus Posted July 4, 2018 Share Posted July 4, 2018 The templates_c folder must be writable by the webserver, same with attachments and downloads. We recommend moving all writeable directories to a non-public location above your web root to prevent web based access and enhancing security. Please have a look at our documentation here regarding further securing WHMCS: https://docs.whmcs.com/Further_Security_Steps Please also note the WHMCS Requirements when installing WHMCS does list out the required folder permissions: https://docs.whmcs.com/Installing_WHMCS#Installing_WHMCS 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.