9.2. Permission settings for the cache files
Prev | Chapter 9. Using the JpGraph cache system | Next

## 9.2. Permission settings for the cache files

Note: This section is only applicable to a Unix derivate system which have the concepts of group and file ownership.

There are two additional settings that will allow the control of the group and file permission settings

1. `DEFINE('CACHE_FILE_GROUP','www')`

2. `DEFINE('CACHE_FILE_MOD',0664)`

The `CACHE_FILE_GROUP` specifies what group should be set on the cached image file. If this is left empty then the group will be the same as the process running PHP.

The `CACHE_FILE_MOD` specifies the file permissions for the image file. If this is left empty the default permissions used by PHP will be set on the file.

When PHP is run from the command line (using the PHP CLI version) then the file permission and group will normally be set to the one of the suer running PHP. Keep in mind that normally ordinary users are not allowed to change the group to '`www`' (the default Apache2 group).

Prev | Up | Next
Chapter 9. Using the JpGraph cache system | Home | 9.3. Using the cache in your script