I've read several threads about this, but still can't resolve the issue.
We use apache + PHP-FPM. In Magento tree files are owned by
apache-user:dev. Now, using
775 / 664 for dirs and files. Also, we disabled redis and using files for backend cache.
When I clear / flush cache in backend, most files get written in
magento-dir/var/cache as usual, but I noticed some files are written in system
/tmp (not in
/tmp/magento). Actually, 14 files with "Locale" serialized data:
That is, some files get written correctly in var/cache and others in system /tmp directory.
Running scripts in magento root to get system var dir:
<?php echo sys_get_temp_dir(); ?>
and magento var:
<?php require_once('app/Mage.php'); //Path to Magento umask(0); Mage::app(); $var_dir = Mage::getModel('core/config')->getVarDir(); echo $var_dir;
magento-dir/var, as expected.
Also, permissions seem correct, since most files get written properly.
Anyone with this behavior?