Jump to content

WHMCS permission issues: php-fpm and chmod 755


Recommended Posts

Hey guys

I'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_c
But, 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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated