Cache folder problems

I keep getting these errors listed below. However the strange thing is those folders do not exist in the install zip. I have downloaded it several times to examine the zip 7.9.2 does not contain the listed folders within cache. It contains only 2 directories labeled include and themes. Making my own folders does not work either.
I am running linux kernel: 3.14.32-xxxx-grs-ipv6-64. All permissions were set and verified as per instructions found on this forum.
Any help would be greatly appreciated.

Writable Cache Sub-Directories

The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the ‘read only’ option and apply it to all subfolders.

Please fix the following files or directories before proceeding:
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cache/layout
/home/crmheroic/public_html/cache/pdf
/home/crmheroic/public_html/cache/xml
/home/crmheroic/public_html/cache/include/javascript

Writable Modules Sub-Directories and Files

Warning: Not Writable

Please fix the following module directories and the files under them before proceeding:
/modules

Hi,
this is because the install have not the _www or apache write permission.
you must correct correct the permission of apache/php

You can bypass by creating manually the folder… but the problem come back.
This is a linux “version/os/apache” error in config.

Regards

Could you perhaps point me towards a guide explaining how to do that? I’m afraid I don’t understand the problem well enough to find the correct guide. Thank you for your help.

@twilliams you said you followed instructions from the forums, but the forums have hundreds of instructions, and some of them are plain wrong…

Permissions don’t mean anything without the associated ownerships. So we’d have to check whether everything is alright with ownerships also.

Plus, the way new directories and new files inherit permissions depends on the The SUID/GUID bits of the parent. Maybe that’s what you have wrong.

Can you please tell us the output of this command from your SuiteCRM root directory?

ls -al

Also, which user is your web server running under? Apache? www-root?

Sure though to be clear the instructions I have followed have been posted almost solely by Admins.
Anywho here is the requested information. If this helps, I am on a WHM dedicated server with multiple accounts, within cpannel it I tried to upload the pics here but the attachments button seems broken so here is a screenshot of what WHM shows. http://i.imgur.com/46SvuZC.png
I am currently logged in as root for the install.

Here is a screenshot of ls -al It is strange because I noticed custom is highlighted http://i.imgur.com/Wk1UtY4.png

drwxr-xr-x 20 apache apache 4096 Jun 30 02:15 .
drwx–x--x 12 crmheroic crmheroic 4096 Jul 11 02:05 …
drwxr-xr-x 4 apache apache 4096 Jun 30 02:06 cache
-rwxr-xr-x 1 apache apache 3590 Jun 29 10:31 campaign_tracker.php
drwxr-xr-x 2 apache apache 4096 Jul 10 10:52 cgi-bin
-rwxr-xr-x 1 apache apache 462 Jun 29 10:31 composer.json
-rwxr-xr-x 1 apache apache 17908 Jun 29 10:31 composer.lock
-rwxrw-rw- 1 apache apache 47 Jun 29 10:31 config_override.php
-rwxr-xr-x 1 apache apache 5052 Jun 29 10:31 cron.php
-rwxr-xr-x 1 apache apache 2446 Jun 29 10:31 crossdomain.xml
drwxrw-rw- 5 apache apache 4096 Jun 29 10:31 custom
drwxrwxr-x 3 apache apache 4096 Jun 29 10:31 data
-rwxr-xr-x 1 apache apache 2388 Jun 29 10:31 dictionary.php
-rwxr-xr-x 1 apache apache 12541 Jun 29 10:31 download.php
-rwxr-xr-x 1 apache apache 2392 Jun 29 10:31 emailmandelivery.php
-rwxr-xr-x 1 apache apache 4912 Jun 29 10:31 export.php
-rwxr-xr-x 1 apache apache 967627 Jun 29 10:31 files.md5
-rwxr-xr-x 1 apache apache 2811 Jun 29 10:31 HandleAjaxCall.php
-rwxr-xr-x 1 apache apache 277 Jul 10 10:59 .htaccess
-rwxr-xr-x 1 apache apache 2371 Jun 29 10:31 ical_server.php
drwxr-xr-x 58 apache apache 4096 Jun 29 10:31 include
-rwxr-xr-x 1 apache apache 2374 Jun 29 10:31 index.php
drwxr-xr-x 6 apache apache 4096 Jun 29 10:31 install
-rwxr-xr-x 1 apache apache 30844 Jun 29 10:31 install.php
-rwxr-xr-x 1 apache apache 13373 Jun 29 10:31 json_server.php
drwxr-xr-x 3 apache apache 4096 Jun 29 10:31 jssource
-rwxr-xr-x 1 apache apache 34539 Jun 29 10:31 LICENSE.txt
-rwxr-xr-x 1 apache apache 2313 Jun 29 10:31 log_file_restricted.html
-rwxr-xr-x 1 apache apache 2376 Jun 29 10:31 maintenance.php
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 metadata
drwxr-xr-x 3 apache apache 4096 Jun 29 10:31 ModuleInstall
drwxr-xr-x 112 apache apache 4096 Jun 29 10:31 modules
-rwxr-xr-x 1 apache apache 2890 Jun 29 10:31 pdf.php
-rwxr-xr-x 1 apache apache 304 Jun 29 10:31 php_version.php
-rwxr-xr-x 1 apache apache 3370 Jun 30 02:06 README.md
-rwxr-xr-x 1 apache apache 73 Jun 29 10:31 robots.txt
-rwxr-xr-x 1 apache apache 3588 Jun 29 10:31 run_job.php
drwxr-xr-x 11 apache apache 4096 Jun 29 10:31 service
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 soap
-rwxr-xr-x 1 apache apache 4091 Jun 29 10:31 soap.php
-rwxr-xr-x 1 apache apache 5327 Jun 29 10:31 SugarSecurity.php
-rwxr-xr-x 1 apache apache 154 Jun 29 10:31 sugar_version.json
-rwxr-xr-x 1 apache apache 2263 Jun 29 10:31 sugar_version.php
-rwxr-xr-x 1 apache apache 169 Jun 30 02:06 suitecrm_version.php
drwxrwxr-x 6 apache apache 4096 Jun 29 10:31 themes
-rwxr-xr-x 1 apache apache 465 Jun 29 10:31 .travis.yml
-rwxr-xr-x 1 apache apache 5843 Jun 29 10:31 TreeData.php
drwxrwxr-x 2 apache apache 4096 Jun 29 10:31 upload
-rwxr-xr-x 1 apache apache 2707 Jun 29 10:31 vcal_server.php
-rwxr-xr-x 1 apache apache 2980 Jun 29 10:31 vCard.php
drwxr-xr-x 3 apache apache 4096 Jul 10 10:53 .well-known
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 XTemplate
drwxr-xr-x 8 apache apache 4096 Jun 29 10:31 Zend

First apply the recommended permissions from the SuiteCRM root folder:


    sudo chown -R apache:apache .
    sudo chmod -R 755 .
    sudo chmod -R 775 cache custom modules themes data upload config_override.php 

Pay attention, some of those commands end with a space followed by a dot (" .")

Set up default permissions in config.php:

'default_permissions' =>
  array (
    'dir_mode' => 02755,
    'file_mode' => 0644,
    'user' => 'apache',
    'group' => 'apache',
  ),

That should really be enough, but for extra points regarding your specific problem, set the GID bit on the cache directory to make sure the subfolders get created correctly:

chmod 2755 cache

Finally, make sure your scheduler jobs aren’t running as root, otherwise they will ruin all this work. To know which user they’re running under, check the appropriate section in this article.

Thanks for the help, unfortunately following those directions increases my number errors (Shown below)
I had done those exact commands previously (other than the config.php part) and “fixed them” by changing those folders to 766 as suggested by the instructions given here by the install wizard.

Writable SuiteCRM Configuration File (config.php)

The config file exists but is not writeable. Please take the necessary steps to make the file writeable. Depending on your Operating system, this might require you to change the permissions by running chmod 766, or to right click on the filename to access the properties and uncheck the read only option.

Config override

The config override file exists but is not writeable. Please take the necessary steps to make the file writeable. Depending on your Operating system, this might require you to change the permissions by running chmod 766, or to right click on the filename to access the properties and uncheck the read only option.

Writeable Custom Directory

The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or right click on it and uncheck the read only option, depending on your Operating System. Please take the needed steps to make the file writeable.
Writable Cache Sub-Directories

The files or directories listed below are not writeable or are missing and cannot be created. Depending on your Operating System, correcting this may require you to change permissions on the files or parent directory (chmod 755), or to right click on the parent directory and uncheck the ‘read only’ option and apply it to all subfolders.

Please fix the following files or directories before proceeding:
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cache/layout
/home/crmheroic/public_html/cache/pdf
/home/crmheroic/public_html/cache/xml
/home/crmheroic/public_html/cache/include/javascript

Writable Modules Sub-Directories and Files

Warning: Not Writable

Please fix the following module directories and the files under them before proceeding:
/modules
Writable Upload Directory

This doesn’t make sense, no more permissions are needed. I think some of the information here must be mistaken, so please investigate these three things so we can try and get this right:

  • try changing the owner from your SuiteCRM root directory:
sudo chown crmheroic:crmheroic .

(if that makes things worse, just change it back to apache:apache. If it makes things work, fix that also in config.php)

  • have you already set up your Scheduler jobs in cron? If so, exactly how?

  • what are the contents of your .htaccess? Did you create it or change it (the installer creates it, I’m just asking if you did anything manually)?

Changing the owner neither helped nor caused more problems.

.htaccess contents are as follows

php – BEGIN cPanel-generated handler, do not edit

Set the “ea-php70” package as the default “PHP” programming language.

AddType application/x-httpd-ea-php70 .php .php7 .phtml # php -- END cPanel-generated handler, do not edit

I did nothing manually .htaccess was there from the begging. I unzipped the files on linux and copied to correct directory then I changed permissions and attempted to run the install.
Here is a picture of the contents of the zip http://i.imgur.com/jqtgNWs.png I have installed suitecrm in the past with no problems. I am actually migrating 2 installs onto this server but have been having trouble installing new suitecrm from scratch.

EDIT

Changing permissions does not appear to have applied to everything. I entered the command exactly as you listed it including the . “sudo chown crmheroic:crmheroic .” this is the current ls -al
As you can see below, it only sugarcrm.log and install.log belong to crmheroic

drwxr-xr-x 20 crmheroic crmheroic 4096 Jul 11 15:26 .
drwx–x--x 12 crmheroic crmheroic 4096 Jul 11 02:05 …
drwxrwsr-x 4 apache apache 4096 Jun 30 02:06 cache
-rwxr-xr-x 1 apache apache 3590 Jun 29 10:31 campaign_tracker.php
drwxr-xr-x 2 apache apache 4096 Jul 10 10:52 cgi-bin
-rwxr-xr-x 1 apache apache 462 Jun 29 10:31 composer.json
-rwxr-xr-x 1 apache apache 17908 Jun 29 10:31 composer.lock
-rwxrwxr-x 1 apache apache 47 Jun 29 10:31 config_override.php
-rwxr-xr-x 1 apache apache 5052 Jun 29 10:31 cron.php
-rwxr-xr-x 1 apache apache 2446 Jun 29 10:31 crossdomain.xml
drwxrwxr-x 5 apache apache 4096 Jun 29 10:31 custom
drwxrwxr-x 3 apache apache 4096 Jun 29 10:31 data
-rwxr-xr-x 1 apache apache 2388 Jun 29 10:31 dictionary.php
-rwxr-xr-x 1 apache apache 12541 Jun 29 10:31 download.php
-rwxr-xr-x 1 apache apache 2392 Jun 29 10:31 emailmandelivery.php
-rwxr-xr-x 1 apache apache 4912 Jun 29 10:31 export.php
-rwxr-xr-x 1 apache apache 967627 Jun 29 10:31 files.md5
-rwxr-xr-x 1 apache apache 2811 Jun 29 10:31 HandleAjaxCall.php
-rwxr-xr-x 1 apache apache 277 Jul 10 10:59 .htaccess
-rwxr-xr-x 1 apache apache 2371 Jun 29 10:31 ical_server.php
drwxr-xr-x 58 apache apache 4096 Jun 29 10:31 include
-rwxr-xr-x 1 apache apache 2374 Jun 29 10:31 index.php
drwxr-xr-x 6 apache apache 4096 Jun 29 10:31 install
-rw-r–r-- 1 crmheroic crmheroic 7486 Jul 11 15:29 install.log
-rwxr-xr-x 1 apache apache 30844 Jun 29 10:31 install.php
-rwxr-xr-x 1 apache apache 13373 Jun 29 10:31 json_server.php
drwxr-xr-x 3 apache apache 4096 Jun 29 10:31 jssource
-rwxr-xr-x 1 apache apache 34539 Jun 29 10:31 LICENSE.txt
-rwxr-xr-x 1 apache apache 2313 Jun 29 10:31 log_file_restricted.html
-rwxr-xr-x 1 apache apache 2376 Jun 29 10:31 maintenance.php
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 metadata
drwxr-xr-x 3 apache apache 4096 Jun 29 10:31 ModuleInstall
drwxrwxr-x 112 apache apache 4096 Jun 29 10:31 modules
-rwxr-xr-x 1 apache apache 2890 Jun 29 10:31 pdf.php
-rwxr-xr-x 1 apache apache 304 Jun 29 10:31 php_version.php
-rwxr-xr-x 1 apache apache 3370 Jun 30 02:06 README.md
-rwxr-xr-x 1 apache apache 73 Jun 29 10:31 robots.txt
-rwxr-xr-x 1 apache apache 3588 Jun 29 10:31 run_job.php
drwxr-xr-x 11 apache apache 4096 Jun 29 10:31 service
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 soap
-rwxr-xr-x 1 apache apache 4091 Jun 29 10:31 soap.php
-rw-r–r-- 1 crmheroic crmheroic 0 Jul 11 15:25 sugarcrm.log
-rwxr-xr-x 1 apache apache 5327 Jun 29 10:31 SugarSecurity.php
-rwxr-xr-x 1 apache apache 154 Jun 29 10:31 sugar_version.json
-rwxr-xr-x 1 apache apache 2263 Jun 29 10:31 sugar_version.php
-rwxr-xr-x 1 apache apache 169 Jun 30 02:06 suitecrm_version.php
drwxrwxr-x 6 apache apache 4096 Jun 29 10:31 themes
-rwxr-xr-x 1 apache apache 465 Jun 29 10:31 .travis.yml
-rwxr-xr-x 1 apache apache 5843 Jun 29 10:31 TreeData.php
drwxrwxr-x 2 apache apache 4096 Jun 29 10:31 upload
-rwxr-xr-x 1 apache apache 2707 Jun 29 10:31 vcal_server.php
-rwxr-xr-x 1 apache apache 2980 Jun 29 10:31 vCard.php
drwxr-xr-x 3 apache apache 4096 Jul 10 10:53 .well-known
drwxr-xr-x 2 apache apache 4096 Jun 29 10:31 XTemplate
drwxr-xr-x 8 apache apache 4096 Jun 29 10:31 Zend
drwxr-xr-x 3 apache apache 4096 Jul 10 13:28 zipped

Contents of install.log

2017-07-11 21:25:04…Begin System Check Process *************
2017-07-11 21:25:04…XML Parsing Support Found
2017-07-11 21:25:04…MBString Support Found
2017-07-11 21:25:04…ZIP Support Found
2017-07-11 21:25:04…ERROR:: The config file exists but is not writeable. Please take the necessary steps to make the file writeable. Depen$
2017-07-11 21:25:04…ERROR:: The config override file exists but is not writeable. Please take the necessary steps to make the file writeab$
2017-07-11 21:25:04…ERROR:: The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or righ$
2017-07-11 21:25:04…ERROR:: Some subdirectories in cache subfolder were not read/writeable:
2017-07-11 21:25:04…
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cach$
2017-07-11 21:25:04…ERROR:: Module directories and the files under them are not writeable.
2017-07-11 21:25:04…ERROR: Upload directory is not writable.
2017-07-11 21:25:04…/zip check passed
2017-07-11 21:25:04…PCRE version check passed
2017-07-11 21:25:04…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:25:04…php.ini location found. /opt/cpanel/ea-php70/root/etc/php.ini
2017-07-11 21:25:04…Outputting HTML for System check
2017-07-11 21:25:04…Errors were found *************
2017-07-11 21:25:06…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:26:25…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:26:58…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:27:02…Begin System Check Process *************
2017-07-11 21:27:02…XML Parsing Support Found
2017-07-11 21:27:02…MBString Support Found
2017-07-11 21:27:02…ZIP Support Found
2017-07-11 21:27:02…ERROR:: The config override file exists but is not writeable. Please take the necessary steps to make the file writeab$
2017-07-11 21:27:02…ERROR:: The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or righ$
2017-07-11 21:27:02…ERROR:: Some subdirectories in cache subfolder were not read/writeable:
2017-07-11 21:27:02…
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cach$
2017-07-11 21:27:02…ERROR:: Module directories and the files under them are not writeable.
2017-07-11 21:27:02…ERROR: Upload directory is not writable.
2017-07-11 21:27:02…/zip check passed
2017-07-11 21:27:02…PCRE version check passed
2017-07-11 21:27:02…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:27:02…php.ini location found. /opt/cpanel/ea-php70/root/etc/php.ini
2017-07-11 21:27:02…Outputting HTML for System check
2017-07-11 21:27:02…Errors were found *************
2017-07-11 21:27:10…Begin System Check Process *************
2017-07-11 21:27:10…XML Parsing Support Found
2017-07-11 21:27:10…MBString Support Found
2017-07-11 21:27:10…ZIP Support Found
2017-07-11 21:27:10…ERROR:: The config override file exists but is not writeable. Please take the necessary steps to make the file writeab$
2017-07-11 21:27:10…ERROR:: The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or righ$
2017-07-11 21:27:10…ERROR:: Some subdirectories in cache subfolder were not read/writeable:
2017-07-11 21:27:10…
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cach$
2017-07-11 21:27:10…ERROR:: Module directories and the files under them are not writeable.
2017-07-11 21:27:10…ERROR: Upload directory is not writable.
2017-07-11 21:27:10…/zip check passed
2017-07-11 21:27:10…PCRE version check passed
2017-07-11 21:27:10…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:27:10…php.ini location found. /opt/cpanel/ea-php70/root/etc/php.ini
2017-07-11 21:27:10…Outputting HTML for System check
2017-07-11 21:27:10…Errors were found *************
2017-07-11 21:29:32…Begin System Check Process *************
2017-07-11 21:29:32…XML Parsing Support Found
2017-07-11 21:29:32…MBString Support Found
2017-07-11 21:29:32…ZIP Support Found
2017-07-11 21:29:32…ERROR:: The config override file exists but is not writeable. Please take the necessary steps to make the file writeab$
2017-07-11 21:29:32…ERROR:: The Custom Directory exists but is not writeable. You may have to change permissions on it (chmod 766) or righ$
2017-07-11 21:29:32…ERROR:: Some subdirectories in cache subfolder were not read/writeable:
2017-07-11 21:29:32…
/home/crmheroic/public_html/cache/
/home/crmheroic/public_html/cache/images
/home/crmheroic/public_html/cach$
2017-07-11 21:29:32…ERROR:: Module directories and the files under them are not writeable.
2017-07-11 21:29:32…ERROR: Upload directory is not writable.
2017-07-11 21:29:32…/zip check passed
2017-07-11 21:29:32…PCRE version check passed
2017-07-11 21:29:32…installerHook: Could not find custom/install/install_hooks.php
2017-07-11 21:29:32…php.ini location found. /opt/cpanel/ea-php70/root/etc/php.ini
2017-07-11 21:29:32…Outputting HTML for System check
2017-07-11 21:29:32…Errors were found *************

Sorry, my bad: I forgot the recursive flag, it should have been

sudo chown -R crmheroic:crmheroic .

try it like that, I think it’s going to work.

1 Like

Aha, thank you very much that did indeed solve the issue. Now I can proceed.
Once again thank you for taking the time to help me.

I’m glad it worked! Remember to set that username also in config.php.