An upgrade from Parallels Plesk 9.5 fails with one of the following messages:
Error: Unable to execute file-sharing: ERROR: Dependent row(s) 'FileSharingUsers.userId = 1' isn't found for 'smb_users.id = 1'.
Updating client with id 7...
Zend_Db_Statement_Exception: SQLSTATE[230 00]: Integrity constraint violation: 1062 Duplicate entry '1' for key 1
After the upgrade, the
smb_rolestable has no roles belonging to the administrator's users:
mysql> select * from smb_roles where ownerId = (select id from clients where login = 'admin');
Empty set (0.00 sec)
The internal ID of the
admin user in the Plesk database was not
1 before the upgrade, and the Plesk upgrade script failed to properly update the administrator account's properties.
This problem is caused by a known issue (with the report ID TP-141589 ). The issue has been completely fixed in Parallels Plesk 11.5 MU#14 .
Download patch_141611v2.tar.gz to the server.
Apply the patch with the following command:
tar zxf patch_141611v2.tar.gz -C /usr/local/psa/admin/ --backup
Re-run the database upgrade procedure to create the administrator's roles:
Get the Admin role from the
smb_rolestable and update
smb_roleServicePermissionswith the correct
mysql> update smb_roleServicePermissions rsp, smb_servicePermissions sp, smb_roles sr set rsp.roleId=sr.id where rsp.servicePermissionId=sp.id and sp.permissionCode="external" and sr.isBuiltIn=1 and sr.name="Admin";
Re-run the filesharing upgrade:
Reconfigure the web server configuration: