Wordpress sites // Some files and dirs in wp-content getting reset to www-data:www-data

Discussion in 'General' started by Spawnsworth, Sep 7, 2018.

  1. Spawnsworth

    Spawnsworth Member

    Hi all,

    We're having a strange issue on one of our client's ISP Config (3.1.13) servers whereby the permissions of a number of files and folders inside wp-content are being reset from the default web*:client* to www-data:www-data. This is causing Wordpress auto updates to fail and other plugin issues.

    Every time I change permissions back to web*:client* this fixes the problem but only temporariliy until whatever is resetting them back to www-data:www:data

    Our typical wordpress site permissions are 644 for files and 755 for directories (including wp-content). I've used this with many sites and never seen this before. There's about 6 sites on this server and the same thing happens with all of them.

    Hopefully somoene out there can help me solve this mystery!

  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Please check that the PHP mode of the site is either php-fpm or php-fcgi and that the suexec checkbox in the site settings is enabled.
  3. Spawnsworth

    Spawnsworth Member

    Thanks Till,

    I can see that PHP-FPM is selected and SUDOEXEC is checked for each site, but I have found something rather obvious that I didn't spot before. There is no php-fpm service running on the server, yet the websites are working despite choosing PHP-FPM for each site? PHP 7.0 is default and is installed, but there's no init.d startup script for php7.0-fpm and nothing in systemctl.

    I tried installing all of the PHP modules again from the 16.04 perfect server build guide but only 2 were upgraded and nothing missing.

    Can you offer any advice on how to resolve this as gracefully as possible? I have no clue how this server had been working happily for several months and this was never noticed until now!

  4. Jesse Norell

    Jesse Norell ISPConfig Developer Staff Member ISPConfig Developer

    Fix that, as the daemon must be running for php-fpm mode to work. (I don't have a ubuntu server handy, but "service php-fpm start" might start it one time, and update-rc.d might be the tool to enable it at boot).

    Ensure you have the fastcgi module installed and enabled, as per https://www.howtoforge.com/tutorial...ind-postfix-doveot-and-ispconfig/2/#g0.0.14.2

    If you did a dist-upgrade, rather than just within 16.04, you should check the php settings under System > Server Config > {server} > Web > PHP Settings.

Share This Page