Question: Plesk panel and all domains are down after moving vhost directory: PleskUtilException: Path is not allowed
Symptoms
- While performing relocation of VHOST directory via Plesk Reconfigurator the following error appeared:
Incorrect function. (Error code 1) at ftpmng failed: The system cannot find the file specified. (Error code 2) at GetLongPathName(D:\Websites\example.com\httpdocs\Staging)
at (VFileName: longFile Name line 253)
at psaobsolete. Virtual HostsLocation.Change (String source, String dest)
at reconfigurator.Change Location. Set Relocate State()
- Plesk and all domains are down with the following error:
Server Error
500 - Internal server error.
There is a problem with the resource you are looking for, and it cannot be displayed.
- After repairing Plesk database with plesk repair db the following error can be shown while accessing any Plesk element:
PleskUtilException: Path is not allowed
- The following error can be found in %plesk_dir%admin\logs\php_error.log:
ERR [panel] PleskUtilException: Path is not allowed
file: C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Filesystem\Plesk\Windows.php
line: 763
code: 0
trace: #0 C:\Program Files (x86)\Plesk\admin\plib\Service\Driver\Filesystem\Plesk\Windows.php(53): Service_Driver_Filesystem_Plesk_Windows::checkAdvancedFilemngXMLErrorCode(string '<XmlError Error="Path is not allowed." ErrorCode="path_is_not_allowed" ErrorDetails="C:\inetpub\vhos...')
#1 C:\Program Files (x86)\Plesk\admin\plib\FileManager.php(314): Service_Driver_Filesystem_Plesk_Windows->ls(string 'staging', string 'C:\Inetpub\vhosts\example.com', string 'dirs', string 'bytes', boolean true)
#2 C:\Program Files (x86)\Plesk\admin\plib\FileManager.php(304): FileManager->ls_wrapper(string 'dirs', string 'C:\Inetpub\vhosts\example.com', boolean true)
#3 C:\Program Files (x86)\Plesk\admin\plib\Smb\View\List\ContentFiles.php(108): FileManager->ls_dirs_wrapper(string 'C:\Inetpub\vhosts\example.com', boolean true)
#4 C:\Program Files (x86)\Plesk\admin\plib\Smb\View\List\ContentFiles.php(100): Smb_View_List_ContentFiles->_getDirectoriesList(string 'C:\Inetpub\vhosts\example.com')
#5 C:\Program Files (x86)\Plesk\admin\plib\CommonPanel\View\List\Abstract.php(482): Smb_View_List_ContentFiles->_getDataProvider()
#6 C:\Program Files (x86)\Plesk\admin\plib\CommonPanel\View\List\Abstract.php(225): CommonPanel_View_List_Abstract->_setupPaginator()
#7 C:\Program Files (x86)\Plesk\admin\plib\CommonPanel\View\List\Abstract.php(217): CommonPanel_View_List_Abstract->_setupList()
#8 C:\Program Files (x86)\Plesk\admin\application\smb\controllers\FileManagerController.php(1266): CommonPanel_View_List_Abstract->__construct(object of type Zend_View, object of type Zend_Controller_Request_Http, array)
#9 C:\Program Files (x86)\Plesk\admin\application\smb\controllers\FileManagerController.php(850): Smb_FileManagerController->_getFilesList()
#10 C:\Program Files (x86)\Plesk\admin\plib\vendor\plesk\zf1\library\Zend\Controller\Action.php(516): Smb_FileManagerController->listAction()
#11 C:\Program Files (x86)\Plesk\admin\plib\vendor\plesk\zf1\library\Zend\Controller\Dispatcher\Standard.php(308): Zend_Controller_Action->dispatch(string 'listAction')
#12 C:\Program Files (x86)\Plesk\admin\plib\vendor\plesk\zf1\library\Zend\Controller\Front.php(954): Zend_Controller_Dispatcher_Standard->dispatch(object of type Zend_Controller_Request_Http, object of type Zend_Controller_Response_Http)
#13 C:\Program Files (x86)\Plesk\admin\plib\Application\Web.php(48): Zend_Controller_Front->dispatch(object of type Zend_Controller_Request_Http)
#14 C:\Program Files (x86)\Plesk\admin\htdocs\application.php(15): Plesk\Application_Web->run()
Cause
Incorrect VHOST paths in the database and Windows registry. Plesk Reconfigurator changed paths in psa database and Windows registry but due to an error, all the files and domain content are still in the old VHOST path.
Resolution
1.Connect to the server via RDP
2.Backup psa database:
plesk db dump psa > c:\psa.sql
3.Repair paths with the following command:
plesk repair db -v
4.Open registry editor and change the path for HTTPD_VHOSTS_D value at Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\PLESK\PSA Config\Config