protected function changePermission($path, $octal = 0755)
    {
        $status = false;

        if(!is_writable($path))
            chmod($path, $octal);

        if(!is_readable($path))
            chmod($path, $octal);

        if(is_readable($path) && is_writable($path))
            $status = true;

        return $status;

    }
protected function changePermission($path, $octal = 0755)
    {
        $status = false;

        if(!is_writable($path))
            chmod($path, $octal);

        if(!is_readable($path))
            chmod($path, $octal);

        if(is_readable($path) && is_writable($path))
            $status = true;

        return $status;

    }
protected function changePermission ( $ path , $ octal = 0755 ) { $ status = false ; if ( ! is_writable ( $ path ) ) chmod ( $ path , $ octal ) ; if ( ! is_readable ( $ path ) ) chmod ( $ path , $ octal ) ; if ( is_readable ( $ path ) && is_writable ( $ path ) ) $ status = true ; return $ status ; }
Change folder permission to 0755

@param string $path
Change folder permission to 0755