rhubarbgroup / redis-cache

A persistent object cache backend for WordPress powered by Redis. Supports Predis, PhpRedis, Relay, replication, sentinels, clustering and WP-CLI.
https://wordpress.org/plugins/redis-cache/
GNU General Public License v3.0
427 stars 149 forks source link

Filesystem: Not Writeable #435

Closed CommittotheIndian closed 1 year ago

CommittotheIndian commented 1 year ago

After updating my Wordpress file permissions, Redis Object Cache now shows X Not writeable next to Filesystem. Everything "seems" to be running correctly but I can't Disable Object Cache now. I'm not actually sure if working correctly or not. Permissions were set in accordance with WP's suggestions.

I've searched all over and seems others have had the issue but never posted a solution.

Status: Connected
Client: Predis (v2.1.1)
Drop-in: Valid
Disabled: No
Ping: PONG
Errors: []
PhpRedis: Not loaded
Relay: Not loaded
Predis: 2.1.1
Credis: Not loaded
PHP Version: 7.4.30
Plugin Version: 2.2.4
Redis Version: 7.0.9
Multisite: No
Metrics: Enabled
Metrics recorded: 37
Filesystem: Content directory is not writable.
Global Prefix: "nwrcc_"
Blog Prefix: "nwrcc_"
WP_REDIS_PLUGIN_PATH: "/volume1/web/nwrcc/wp-content/plugins/redis-cache"
Global Groups: [
    "blog-details",
    "blog-id-cache",
    "blog-lookup",
    "global-posts",
    "networks",
    "rss",
    "sites",
    "site-details",
    "site-lookup",
    "site-options",
    "site-transient",
    "users",
    "useremail",
    "userlogins",
    "usermeta",
    "user_meta",
    "userslugs",
    "redis-cache",
    "blog_meta"
]
Ignored Groups: [
    "counts",
    "plugins",
    "themes"
]
Unflushable Groups: []
Groups Types: {
    "blog-details": "global",
    "blog-id-cache": "global",
    "blog-lookup": "global",
    "global-posts": "global",
    "networks": "global",
    "rss": "global",
    "sites": "global",
    "site-details": "global",
    "site-lookup": "global",
    "site-options": "global",
    "site-transient": "global",
    "users": "global",
    "useremail": "global",
    "userlogins": "global",
    "usermeta": "global",
    "user_meta": "global",
    "userslugs": "global",
    "redis-cache": "global",
    "counts": "ignored",
    "plugins": "ignored",
    "themes": "ignored",
    "blog_meta": "global"
}
Drop-ins: [
    "Redis Object Cache Drop-In v2.2.4 by Till Krüss"
]
tillkruss commented 1 year ago

This mean Redis Object Cache can't write a file to /volume1/web/nwrcc/wp-content/. Might want to give PHP more permissions, if you want to use the UI to enable/disable the drop-in.

CommittotheIndian commented 1 year ago

Obviously.

The question is what file (php) needs what permission? Because 777 for object-cache.php does nothing.

tillkruss commented 1 year ago

https://github.com/rhubarbgroup/redis-cache/blob/a2ce7e355bbec385b59eb6128b119bd5a9ee0fcb/includes/class-plugin.php#L1195

CommittotheIndian commented 1 year ago

Changing class-plugin.php to 777 also does nothing.

tillkruss commented 1 year ago

As said in https://github.com/rhubarbgroup/redis-cache/issues/435#issuecomment-1473961176, the wp-contents directory must be writeable by PHP for this warning to go away.