Could not apply permission mask > CroogoEventManager.php, line 80

26 views
Skip to first unread message

phpMagpie

unread,
Apr 7, 2018, 7:17:59 AM4/7/18
to Croogo
Hi all,

Anyone else having these problems with Croogo 2.3.2 and no of a way to resolve it?

My server runs apache as the owner of the files, so there is no need to mess around with file masks as has full access and any created dirs/files are given the right user/group permissions.

Despite this, I've got 100's of these in my error.og:
 
2018-03-23 12:28:23 Warning: Warning (2): chmod(): No such file or directory in [/var/homelib/cake/cake29/lib/Cake/Cache/Engine/FileEngine.php, line 361]
Trace:
ErrorHandler::handleError() - CORE/Cake/Error/ErrorHandler.php, line 230
chmod - [internal], line ??
FileEngine::_setKey() - CORE/Cake/Cache/Engine/FileEngine.php, line 361
FileEngine::write() - CORE/Cake/Cache/Engine/FileEngine.php, line 116
Cache::write() - CORE/Cake/Cache/Cache.php, line 317
CroogoEventManager::loadListeners() - APP/Vendor/croogo/croogo/Croogo/Event/CroogoEventManager.php, line 80
require_once - APP/Vendor/croogo/croogo/Croogo/Config/croogo_bootstrap.php, line 128
include - APP/Vendor/croogo/croogo/Croogo/Config/bootstrap.php, line 8
CakePlugin::_includeFile() - CORE/Cake/Core/CakePlugin.php, line 286
CakePlugin::bootstrap() - CORE/Cake/Core/CakePlugin.php, line 205
CakePlugin::load() - CORE/Cake/Core/CakePlugin.php, line 124
include - APP/Config/bootstrap.php, line 78
Configure::bootstrap() - CORE/Cake/Core/Configure.php, line 98
include - CORE/Cake/bootstrap.php, line 432
[main] - APP/webroot/index.php, line 91
 
2018-03-23 12:28:23 Warning: Warning (512): Could not apply permission mask "/home/eurohostelda/domains/eurohostels.co.uk/public_html/tmp/cache/settings/croogo_event_handlers" on cache file "436" in [/var/homelib/cake/cake29/lib/Cake/Cache/Engine/FileEngine.php, line 364]
Trace:
ErrorHandler::handleError() - CORE/Cake/Error/ErrorHandler.php, line 230
FileEngine::_setKey() - CORE/Cake/Cache/Engine/FileEngine.php, line 364
FileEngine::write() - CORE/Cake/Cache/Engine/FileEngine.php, line 116
Cache::write() - CORE/Cake/Cache/Cache.php, line 317
CroogoEventManager::loadListeners() - APP/Vendor/croogo/croogo/Croogo/Event/CroogoEventManager.php, line 80
require_once - APP/Vendor/croogo/croogo/Croogo/Config/croogo_bootstrap.php, line 128
include - APP/Vendor/croogo/croogo/Croogo/Config/bootstrap.php, line 8
CakePlugin::_includeFile() - CORE/Cake/Core/CakePlugin.php, line 286
CakePlugin::bootstrap() - CORE/Cake/Core/CakePlugin.php, line 205
CakePlugin::load() - CORE/Cake/Core/CakePlugin.php, line 124
include - APP/Config/bootstrap.php, line 78
Configure::bootstrap() - CORE/Cake/Core/Configure.php, line 98
include - CORE/Cake/bootstrap.php, line 432
[main] - APP/webroot/index.php, line 91

Nearly every time it's due to:
CroogoEventManager::loadListeners() - APP/Vendor/croogo/croogo/Croogo/Event/CroogoEventManager.php, line 80

All other Croog/CakePHP caching seems to be working without issue. Any ideas how I stop this from happening?  

Cheers, Paul

 

 


Michael Tallroth

unread,
Sep 2, 2018, 2:39:01 AM9/2/18
to Croogo
Most of the time I've had these errors, it was due to the tmp directory's permissions being set incorrectly. However, there was another situation I had recently that was hard to track down, but fairly simple to fix.

If you run cake shells from the command line as yourself, this will set permissions which are probably incompatible with apache, so you need to make sure you either run the shell as the apache user, or clear out any tmp files when you're done running your shells. This is particularly frustrating because everything can be running along fine with no errors logging, then you login to do something simple (at least you think its simple), and you come back a week later and now the log file is filled up. It was fine originally because all the files were from apache. Then you got in there and touched some files (just by running the shell), and now the files have different perms.

Another related situation is if you run any cake shells via a cron job, the cron job must also use the same user:group as your apache server so that any files created by the shell have permissions compatible with apache. I had originally been running the cron as root (which is typical), so the cache files it created had root:root, and then when apache tried to access those files, it would throw a perms error.

Reply all
Reply to author
Forward
0 new messages