Debian upgrade and various user/group permissions problem

Discussion in 'Installation/Configuration' started by nijou, Jun 29, 2019.

  1. nijou

    nijou New Member

    I recently tried to migrate my dedicated server with Debian 9.9 (stretch) Release: 8 to another, with Debian 9.9, Release 9.9.
    On the old server I run one Wordpress (WP) site under Apache and PHP 5.6 in the ModPHP mode.
    On the new server, after the migration, I have encountered such problem with site files ownership:
    1) The files uploaded via FTP have group/user ownership given by ISPConfig
    2) The Wordpress core files, after updating via WP, have also group/user ownership given by ISPConfig.
    2) BUT: The wordpress plugin files, after updating via WP, have "www-data:www-data" ownership. This makes them impossible to delete with FTP client.

    This behaviour has never appeared on the 'old' server. Do you have any hints, what should I do to have these ownership from point 3) set correctly?
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Either you use a wrong PHP mode or you missed to enable suexec in the website. PHP mode must be php-fpm or php-fcgi and suexec checkbox must be enabled.
  3. nijou

    nijou New Member

    Hi Till,
    The site has over 7 years and it was installed in the ModPHP mode and was running like that with no problem. On the new server, it's also in ModPHP mode. Some time ago I tried to change the PHP mode on the old server to FastCGI and then PHP-FPM and the site went down in both cases, with massive 500 server errors. So I wouldn't touch these settings if it's possible.
    SuExec is enabled in both, old and new servers.
  4. till

    till Super Moderator Staff Member ISPConfig Developer

    mod_php is the wrong mode, installing WordPress updates and plugins can not work in that mode as PHP runs under a wrong user and suexec does not work for mod_php. Change php mode as I suggested above.

    The reason for that was probably wrong file permissions. When you used mod_php before, then the files were probably owned by www-data and not by the web user and when you switch to php-fpm or php-fcgi then, it will fail until you corrected the ownership of the files to the web user.

    I run quite a few WordPress sites and all of them use php-fpm.
  5. nijou

    nijou New Member

    Thanks for all replies. I have carefully migrated to the new site 'entry' on ISPConfig with Fast CGI enabled and it works. Great!

Share This Page