Jump to content

"Permission denied" problem with Smarty cache


Recommended Posts

When I try to access Preferences > Templates in my PrestaShop 1.5.6.1 I get the following error:

Fatal error: Uncaught exception 'UnexpectedValueException' with message 'RecursiveDirectoryIterator::__construct(/vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/cache/smarty/cache/blocktopmenu/1): failed to open dir: Permission denied' in /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php:180 Stack trace: #0 [internal function]: RecursiveDirectoryIterator->__construct('/vol1/users/ptt...', 0) #1 /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php(180): RecursiveDirectoryIterator->getChildren() #2 /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php(121): Smarty_Internal_CacheResource_File->clear(Object(Smarty), NULL, NULL, NULL, NULL) #3 /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/tools/smarty/Smarty.class.php(759): Smarty_Internal_CacheResource_File->clearAll(Object(Smarty), NULL) #4 /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/classes/Tools.php(2424): Smarty->clearAllCache() in /vol1/users/pttk_cotg_s/sklepcotg.pttk.pl/tools/smarty/sysplugins/smarty_internal_cacheresource_file.php on line 180

 

That's because the directory .../cache/smarty/cache/blocktopmenu/1 was created by another user (other than the creator of all other folders)! That seems strange to me as a month ago I had the same issue (ownership of blocktopmenu/1 folder), so I asked admin to remove all files from cache and for 2-3 weeks it seemed the problem was solved. Now the same folder with the same strange owner appeared again.
 
Could someone tell me how to prevent that "1" folder from being recreated? Or how to tell Smarty to use "blocktopmenu/0" folder instead (which is owned by the "main" user)?
 
PS. The same issue is for .../cache/smarty/cache/blockcategories/1 folder.
Edited by pkleczek (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...