private static function getChmodForPath($path) { if (self::isPathWithinTmpFolder($path)) { // tmp/* folder return 0750; } // plugins/* and all others return 0755; }