Running XenForo 2 Upgrade fails due to ownership even though Linux group has perms

PHP:
if (!$isWindows)
        {
            // Only allow the upgrade to run if we're not likely to cause mixed file ownership.
            // This is possibly over restrictive. (If relaxed in the future, we should special case
            // to prevent using root unless the files are owned by root.)

            $uid = function_exists('posix_getuid') ? posix_getuid() : fileowner(File::getTempFile());
            if ($uid !== fileowner(__FILE__))
            {
                $error = 'The files are owned by a different user than the upgrade is running as.';
                return false;
            }
        }

/var/www/{website} is owned by "root" (UID 0) and group "www-data" (UID 33). Setup fails as fileowner returns user group 33 (root) but file owner returns 0 (root) and hence fails to upgrade through the admin dashboard.
 
This happens if your ftp user is not your nginx user for example.

you can chown the entire directory with recursion to the correct owner in your ftp client.

or, just use the 1 click upgrade in the acp.
 
This happens if your ftp user is not your nginx user for example.

you can chown the entire directory with recursion to the correct owner in your ftp client.

or, just use the 1 click upgrade in the acp.
The one click upgrade in ACP fails because it says "The files are owned by a different user than the upgrade is running as." As a result, I had to FTP to do the upgrade.
 
yeah, probably because you used ftp the last time too.

after you upload everything, chown it to your web user, like nginx or nobody depending on how you have it set up and then the next time you can use 1 click.
 
Back
Top Bottom