After changing of virtual hosts location websites became unavailable

Refers to:

  • Plesk 12.5 for Windows

Created:

2016-11-16 12:45:14 UTC

Modified:

2016-12-21 19:08:08 UTC

0

Was this article helpful?


Have more questions?

Submit a request

After changing of virtual hosts location websites became unavailable

Symptoms

After changing of virtual hosts location with Plesk Reconfigurator to new drive, websites became unavailable.

psaadm and psacln do not have access permissions to new drive.

Cause

Bug #PPPM-1224 . It is fixed in Plesk Onyx.

Resolution

Upgrade to the latest Plesk version .

If upgrade is not possible:

  1. Create Windows Power Shell script:

    Get-ChildItem -Path <vhosts> -Recurse |
    ForEach-Object {
    $itemPath = $_.FullName
    & icacls.exe "$itemPath" /remove:d psacln
    & icacls.exe "$itemPath" /remove:d psaadm
    & icacls.exe "$itemPath" /remove:g Users
    }

    Where <vhosts> is path to new virtual hosts location.
    Run it to set correct permissions.

  2. Create Windows Power Shell script:

    & "$env:plesk_bin\\dbclient.exe" --direct-sql --sql="select name from domains" | Foreach-Object {
    $domainName = $_.Trim()
    if ($domainName -eq "") { return }
    if ($domainName -eq "name") { return }

    Write-Output "Fixing domain $domainName ..."

    & "$env:plesk_cli\\repair.exe" --repair-webspace-security -webspace-name $domainName -all-filesystem-objects
    & "$env:plesk_cli\\repair.exe" --reconfigure-web-site -web-site-name $domainName
    }

    Run it to repair webspace security and reconfigure all websites.

Have more questions? Submit a request
Please sign in to leave a comment.