protected function setWritableDirs()
    {
        $dirs = array_unique(array_filter(array_merge(Configure::read('WRITABLE_DIRS', []), [
            getConfig('Assets.target'),
            getConfigOrFail('DatabaseBackup.target'),
            getConfigOrFail('Thumber.target'),
            BANNERS,
            LOGIN_RECORDS,
            PHOTOS,
            USER_PICTURES,
        ])));

        return Configure::write('WRITABLE_DIRS', $dirs) ? $dirs : false;
    }