My Dime Is Up
Member
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.