zeitounator/ezpublish — comment on commit 39d62493760e22fbc2ee0d5abe904b7d80408ee5
File:  line 0
By glye:

The root check was developed in order to avoid nasty issues like http://issues.ez.no/15823 where if you configured your caches wrongly, and ran cache clearing as root, it would delete the whole server. I think this patch resolves the issue the wrong way. Instead of having CacheDir code here in the eZFile class, you should set $rootCheck = false when you call recursiveDelete() for the cache dir - presumably in the eZCache class.