• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

How do I get File Cache to work with FastCGI permissions?

brendanc

Active member
#1
Hi,

I have my site running on FastCGI, so all scripts are run as the user instead of apache. For whatever reason, I couldn't use File Caching unless I set chmod on the dir to at least 770, which, although fine, is not ideal (I'd prefer 700).

I noticed that the files in this directory are being created as user:group 48:48 (apache). Any idea why this is? I'm not sure why Zend is creating the cache files with that user/group.

Here is my cache config:

Code:
/* Caching */
$config['cache']['enabled'] = true;
$config['cache']['frontend'] = 'Core';
$config['cache']['frontendOptions'] = array(
    'caching'                  => true,
    'automatic_serialization'  => true,
    'lifetime'                  => 1800,
    'cache_id_prefix'          => 'xf_'
);

$config['cache']['backend'] = 'File';
$config['cache']['backendOptions'] = array(
    'cache_dir' => '{path removed}/internal_data/cache',
    'read_control_type' => 'adler32'
);
 

brendanc

Active member
#2
False alarm. Boy do I feel stupid.

I swear, I checked that I had FastCGI enabled on my site... but I triple-checked... lo and behold, PHP was set to run as an Apache module. All is well, chmod is back to 700.