1. 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?

Discussion in 'XenForo Questions and Support' started by brendanc, Oct 5, 2011.

  1. brendanc

    brendanc Active Member


    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:

    /* 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'
  2. brendanc

    brendanc Active Member

    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.

Share This Page