ameharhughes Posted June 13, 2012 Share Posted June 13, 2012 Hi Everybody. I am just installing WHMCS and have been going through and increasing the security and one of the things was to move the templates_c attachments and download folders, I have done this and edited the config php file, but I am getting the following error; ==================================================================================== Permissions Error The templates compiling directory '/home/whmcs/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. ==================================================================================== Ive checked the spelling of the folder and in the config file and the path and the permissions, google doesnt have much help on the cause as I just find countless other sites with the same issues, I place the folder back into the root web directory it works fine, if I run ls -lh as root on the server, it comes with this ==================================================================================== drwxrwxrwx 2 root root 4.0K Jun 13 22:24 attachments drwxrwxrwx 2 root root 4.0K Jun 13 22:24 downloads drwxrwxrwx 2 root root 4.0K Jun 13 22:33 templates_c ==================================================================================== so it has the correct permissions, does any body know if I need to change anything? or see what the issue is? Thanks in advance. 0 Quote Link to comment Share on other sites More sharing options...
SilverNodashi Posted June 14, 2012 Share Posted June 14, 2012 Change the perms from root to the actual web user 0 Quote Link to comment Share on other sites More sharing options...
easyhosting Posted June 14, 2012 Share Posted June 14, 2012 i know exactly what you have done, you have accessed the sites cpanel through your root WHM and then made the changes. i initially did the same thing. you need to login to the sites cpanel direct as the client and then make the changes, so you are signed in as the sites user and not as root. 0 Quote Link to comment Share on other sites More sharing options...
ameharhughes Posted June 15, 2012 Author Share Posted June 15, 2012 WHMCS is on its own VPS on my ESXi host, there is nothing else on this server, there is no Control Panel at all. So I would have to change the owner to Apache then? 0 Quote Link to comment Share on other sites More sharing options...
bear Posted June 15, 2012 Share Posted June 15, 2012 That depends on what your PHP runs as. Look at the ownership of a file that works. Is it the system user, nobody, root? Ownership needs to be the same as the script runs as. 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted June 15, 2012 Share Posted June 15, 2012 (edited) For a linux server, looking at your paths, /home/whmcs/etc etc etc, i would say your user is whmcs? If so thats the ones you need to be using and not root change user and group in on command chown username:username /path/to/file/template_c/ or change user and group seperately chown username /path/to/templates_c/ chgrp username /path/to/templates_c/ Then Change permission chmod 777 /path/to/template_c/ On a windows server i guess you may have remote desktop, log into remote, browse to directory and edit permissions as you would any other windozy file. ownership is a bigger issue, and you will be better contacting your support team for this. My favorite trick is this, the amount of times if wget a file and forgotten to su username is unbelievable Edited June 15, 2012 by disgruntled 0 Quote Link to comment Share on other sites More sharing options...
ameharhughes Posted June 15, 2012 Author Share Posted June 15, 2012 I checked a few php files before and they are all root root, Ive changed the ownership of the templates_c folder to apache, nobody and root. Ive moved the templates_c folder back into the /var/www folder now so I can continue to configure WHMCS 0 Quote Link to comment Share on other sites More sharing options...
ameharhughes Posted June 15, 2012 Author Share Posted June 15, 2012 For a linux server, looking at your paths, /home/whmcs/etc etc etc, i would say your user is whmcs? If so thats the ones you need to be using and not root change user and group in on command chown username:username /path/to/file/template_c/ or change user and group seperately chown username /path/to/templates_c/ chgrp username /path/to/templates_c/ Then Change permission chmod 777 /path/to/template_c/ On a windows server i guess you may have remote desktop, log into remote, browse to directory and edit permissions as you would any other windozy file. ownership is a bigger issue, and you will be better contacting your support team for this. My favorite trick is this, the amount of times if wget a file and forgotten to su username is unbelievable Its a linux server and the DataCenter is self managed etc, Im sure I can figure out whats wrong i also wouldnt use a Windows Server pffft its all about CentOS/Redhat for me also, I created the whmcs folder in /home, so there isnt actually a whmcs user (sorry for the confusion) tbh 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted June 15, 2012 Share Posted June 15, 2012 Its a linux server and the DataCenter is self managed etc, Im sure I can figure out whats wrong i also wouldnt use a Windows Server pffft its all about CentOS/Redhat for me also, I created the whmcs folder in /home, so there isnt actually a whmcs user (sorry for the confusion) tbh No worries, mine are setup with cpanel i just dont feel all that comfortable managing serves without something graphical.. for that i blame microsoft. none the less at times getting in and getting dirty is the only way. Good luck. 0 Quote Link to comment Share on other sites More sharing options...
disgruntled Posted June 15, 2012 Share Posted June 15, 2012 If its working inside /var/www/ but not in /home/www/ then its a server configuration issue, there is no reason it shouldnt work in that directory otherwise? you could try /var/templates_c/ and see if that works seeing as /var/www/ works fine. 0 Quote Link to comment Share on other sites More sharing options...
bear Posted June 15, 2012 Share Posted June 15, 2012 I created the whmcs folder in /home, so there isnt actually a whmcs user Is the site located in /home also, or is it /home/user or /home/user/something...? 0 Quote Link to comment Share on other sites More sharing options...
Sam0101 Posted April 15, 2023 Share Posted April 15, 2023 This is a very old post, but this issue still perists as the documentation is quite frankly poor. The solution is to replace the path with the FULL path to the file, not just relative from the WHMCS installation directory. Incorrect format: $templates_compiledir = 'new_directory/templates_c'; Correct format: $templates_compiledir = '/home/username/public_html/whmcs/new_directory/templates_c'; I hope this helps someone out there! 0 Quote Link to comment Share on other sites More sharing options...
DennisHermannsen Posted April 15, 2023 Share Posted April 15, 2023 @SamCybrancee AFAIK, the documentation uses the full path as well. 0 Quote Link to comment Share on other sites More sharing options...
Sam0101 Posted April 16, 2023 Share Posted April 16, 2023 20 hours ago, DennisHermannsen said: @SamCybrancee AFAIK, the documentation uses the full path as well. The images within their docs does show an absolute path, yes. From what I've read, I can't see anywhere that specifies it needing to be absolute. Confusion would be from the unedited configuration.php file as it does not use an absolute path, so it's an easy assumption to make that it doesn't require it. 0 Quote Link to comment Share on other sites More sharing options...
carlosreynoso2017 Posted October 1, 2023 Share Posted October 1, 2023 gracias por tu post era permisos del archivo www.facturacion.pe 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.