Title: Autoptimize changes cache folder permissions
Last modified: June 10, 2021

---

# Autoptimize changes cache folder permissions

 *  Resolved [Javier Casares](https://wordpress.org/support/users/javiercasares/)
 * (@javiercasares)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-changes-cache-folder-permissions/)
 * Today I started getting a message saying that the /cache/autoptimize/ folder 
   could not be written to.
 * After checking the folder, I had indeed changed the permissions from the usual
   ones (www-data) to new ones (root).
 * I corrected the permissions, deactivated and activated the plugin, and everything
   was correct. Everything worked correctly until moments later, it changed the 
   permissions again. It only changes the permissions of the Autoptimize folder,
   the rest of the files and folders remain correctly.
 * Any idea why this might be happening?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Optimizing Matters](https://wordpress.org/support/users/optimizingmatters/)
 * (@optimizingmatters)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-changes-cache-folder-permissions/#post-14542958)
 * AO does not explicitly set permissions, but when creating the folders/ files 
   it will use the PHP/ webserver user’s umask (which set the default permissions
   on the operating system level). The only way I can see AO change permissions 
   is when the `wp-content/cache/autoptimize` (or folders below it) is removed and
   AO (through PHP) recreates it. Does that make sense to you in your context somehow?
 * frank
 *  Thread Starter [Javier Casares](https://wordpress.org/support/users/javiercasares/)
 * (@javiercasares)
 * [4 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-changes-cache-folder-permissions/#post-14545394)
 * Yes, it makes sense. I’m using WP-CLI for Crons, and I think may be there the
   problem with the permissions.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Autoptimize changes cache folder permissions’ is closed to new replies.

 * ![](https://ps.w.org/autoptimize/assets/icon-256X256.png?rev=2211608)
 * [Autoptimize](https://wordpress.org/plugins/autoptimize/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/autoptimize/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/autoptimize/)
 * [Active Topics](https://wordpress.org/support/plugin/autoptimize/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/autoptimize/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/autoptimize/reviews/)

## Tags

 * [cache](https://wordpress.org/support/topic-tag/cache/)
 * [folder](https://wordpress.org/support/topic-tag/folder/)
 * [root](https://wordpress.org/support/topic-tag/root/)

 * 2 replies
 * 2 participants
 * Last reply from: [Javier Casares](https://wordpress.org/support/users/javiercasares/)
 * Last activity: [4 years, 11 months ago](https://wordpress.org/support/topic/autoptimize-changes-cache-folder-permissions/#post-14545394)
 * Status: resolved