zxbodya / yii2-gallery-manager

93 stars 61 forks source link

Unexpected rights with createFolder #61

Closed bscheshirwork closed 5 years ago

bscheshirwork commented 5 years ago

https://github.com/zxbodya/yii2-gallery-manager/blob/db899b2c1225c642e3b97ac8c3a95edc1bac171a/GalleryBehavior.php#L278-L288

This command depends of umask(); For example if umask(); return 18 the folders created chmod 0755 instead passed 0777;

I try to use FileHelper for update this:

    private function createFolders($filePath)
    {
        return FileHelper::createDirectory(FileHelper::normalizePath($filePath), 0777);
    }
zxbodya commented 5 years ago

it was migrated from Yii 1.x :) so that is why FileHelper was not used…

but with it - looks much better.