Hi,
Iāve just installed a new 14.0.0.19 and I get this error when running sudo -u www-data php occ maintenance:update:htaccess Error updating .htaccess file, not enough permissions or āoverwrite.cli.urlā set to an invalid URL?
Permissions are fine. I even set g+w as suggested on the forum
overwrite.cli.url on config.php containes the exact same string as the siteās url āhttps://foo-bar.bar.comā
It is failing in lib/private/Setup.php (line 448) in function updateHtaccess().
This particular check fails and for good reason:
$webRoot = parse_url($webRoot, PHP_URL_PATH);
if ($webRoot === null) {
return false;
}
It should be $PHP_URL_PATH. However, that is not the only problem. It is unset when called from cli.
I simply commented out the āreturn false;ā to patch it. The final code looks like:
$webRoot = parse_url($webRoot, PHP_URL_PATH);
if ($webRoot === null) {
//return false;
}