Jump to content

/templates_c/' must be writeable (CHMOD 777) before you can continue.


ameharhughes

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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 by disgruntled
Link to comment
Share on other sites

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 :D

 

also, I created the whmcs folder in /home, so there isnt actually a whmcs user (sorry for the confusion) tbh

Link to comment
Share on other sites

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 :D

 

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.

Link to comment
Share on other sites

  • 10 years later...

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!

Link to comment
Share on other sites

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. 

Link to comment
Share on other sites

  • 5 months later...

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