WordPress.org

Ready to get started?Download WordPress

Forums

[Plugin: DB Cache Reloaded] Feature request: /tmp permissions, location, name (2 posts)

  1. Alexander Gieg
    Member
    Posted 4 years ago #

    And now, a mix of feature requests and bug report. :-)

    What happens is this: the tmp directory DB Cache Reloaded creates inside wp-content, as well as all files inside it, don't have the group write bit set. In other words, the directory and all its subdirectories are set to 755, and files are all set to 644. As a result, in the host I use this makes it impossible for me to manually do anything to them if the need arises, at least without first having to contact the staff to manually chmod everything back to 775/664, or alternatively entirely disabling DB Cache Reloaded, hence erasing the whole folder.

    WordPress has two variables one can set at wp-config.php to control permissions and such, namely FS_CHMOD_FILE and FS_CHMOD_DIR (see Override of default file permissions). So, my first feature request isn't so much that DB Cache Reloaded change its default permissions, but for it to use these two variables if they're set.

    As for the second feature request, it has to do with the tmp folder location. There's another variable one can set in wp-config.php, WP_TEMP_DIR, that allows one to select one's preferred temp path. This is useful because with it we can set WordPress to use an externally-inaccessible folder, hence increasing security. Hence, it'd be quite nice if DB Cache Reloaded used it when it's set, as this can increase security and reduce full backup sizes.

    Having these two features would greatly increase DB Cache Reloaded's host-compatibility and file-system versatility, as shown by how my own wp-config.php file is set:

    define('WP_TEMP_DIR', $_SERVER['NFSN_SITE_ROOT'] . 'protected');
    define('FS_CHMOD_FILE', 0664);
    define('FS_CHMOD_DIR', 0775);

    By the way, if the second suggestion gets implemented, I'd also suggest (this is the 3rd, hehe) the cache folder itself be named something other than tmp, maybe $WP_TEMP_DIR . '/db-query-cache', so as to avoid any potential conflict with other packages also writing into WP_TEMP_DIR.

    Thanks for the nice plugin, for reading, and sorry for the length. I'm quite verbose at times. ;-)

    http://wordpress.org/extend/plugins/db-cache-reloaded/

  2. Daniel Fru?y?ski (sirzooro)
    Member
    Posted 4 years ago #

    Thanks for your post. These features definitely needs implementing.

    BTW, For now you can use define DBCR_CACHE_DIR to specify temp dir for cache files.

Topic Closed

This topic has been closed to new replies.

About this Topic