• Resolved anasgh

    (@anasgh)


    Hello, I’ve been using W3TC for my websites on a VM in a while, and my Host has been notifying me lately that /var/www/WEBSITENAME/wp-content/w3tc-config/master.php has a 777 permission, and that I shouldn’t never give 777 permissions to anything.

    After a while, the same issue was reported but I never updated any permissions, so we started searching and we found that W3TC changes the permissions on its own every time the config is changes.

    the umask in the server is set to 0022, so the default permissions should be 755/644, but for an unknown reason, your plugin changes the permissions to 777 on its own.

    Is this normal behavior? why doesn’t the plugin work with 644 permissions set to its files? What can we do to fix it?

    Thank you for your time and your help !

    • This topic was modified 4 years, 6 months ago by anasgh.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @anasgh

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    W3 Total Cache does not change the permissions for files and folders on your server. W3 Total Cache as a plugin does not have the ability to do so.
    I’ve made sure to check the files and permissions on a couple of installations/servers, and the permissions are all set to:
    Folders 755
    Files 644
    I’ve also checked the master.php and the permission set for that file is 644. I’ve also tried changing the configuration and saving, and still, the permission remained 644.
    This being said, I want to repeat and confirm that W3 Total Cache does not change the permissions on your server does not have the ability to do so.
    Thanks!

    I am seeing this behaviour too. In the following screenshot between the second and third “ls -la” all I did was refresh the plugins page.

    https://ibb.co/hZQ6r7R

    I also see this error when I refresh the plugins page:
    Uncaught Exception: Can’t write to file /var/www/wp-content/w3tc-config/master.php in /var/www/wp-content/plugins/w3-total-cache/Util_File.php:375

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘W3TC changes permissions to 777 on its own’ is closed to new replies.