Article ID: 6661, created on Sep 3, 2009, last review on Aug 12, 2014

  • Applies to:
  • Plesk 9.x for Linux/Unix
  • Plesk 8.x for Linux/Unix

Symptoms

The following error is shown when I try to open a domain in Parallels Plesk Panel 8.x through Domains -> domain.tld:

Unable to create SysUser object: SysUser: unable to select: no such row in the table

0: /usr/local/psa/admin/plib/class.DomainControlForm.php:168
    DomainControlForm->assign(object of type BsDomain)
1: /usr/local/psa/admin/htdocs/domains/dom_ctrl.php3:149


The following error is shown when trying to open a domain in Parallels Plesk Panel 9.x through Domains -> domain.tld:

Unable to create PHostingManager object:An error occured during SysUser class creation: SysUser: unable to select: no such row in the table
0: common_func.php3:108
psaerror(string 'Unable to create PHostingManager object:An error occured during SysUser class creation: SysUser: unable to select: no such row in the table')
1: client.domain.hosting.anonymous-ftp.php:19
plesk__client__domain__hosting__anonymous_ftp->validateHosting(object of type BsDomain)
2: client.domain.hosting.anonymous-ftp.php:47
plesk__client__domain__hosting__anonymous_ftp->validateItem(object of type UserAdmin)
3: UIPointer.php:1123
UIPointer->validate()

Cause

Physical hosting is configured on the domain; however, the appropriate system user is missing:

mysql> select * from (select A.id, A.name as domain, A.htype as 'hosting type', sys_users.login as 'system user' from (select id, concat('/var/www/vhosts/', name) as home, htype, name from domains) A left join sys_users on (A.home=sys_users.home)) B where `hosting type` = 'vrt_hst' and `system user` is NULL;
+-----+------------+--------------+-------------+
| id  | domain     | hosting type | system user |
+-----+------------+--------------+-------------+
|  15 |
domain.tld | vrt_hst      | NULL        |
+-----+------------+--------------+-------------+
1 row in set (0.00 sec)

mysql>


domain.tld is replaced with the name of your domain that is experiencing the problem. /var/www/vhosts is PRODUCT_ROOT_D; it may be /var/www/vhosts, /usr/local/www/vhosts, or /srv/www/vhosts on your server.

Resolution

The following instructions are recommended for resolving the problem.

1. Back up the old database for Parallels Plesk Panel before any reconfiguration.

~# mysqldump -uadmin -p`cat /etc/psa/.psa.shadow` psa > psa.dump.`date +%F.%s`.sql

2. Further instructions depend on whether the domain system user exists.

2.1 System user exists:

~# grep domain.tld /etc/passwd
domain_ftp_user:x:10001:2524::/var/www/vhosts/domain.tld:/bin/false
~#


/var/www/vhosts is PRODUCT_ROOT_D. domain_ftp_user is the old domain's system user.

3.1 To resolve the problem, it is recommended to insert the missing record into the database of Parallels Plesk Panel manually.

3.1.1 Get the ID of the domain's system user:

mysql> select sys_user_id from hosting where dom_id=15;
+-------------+
| sys_user_id |
+-------------+
|           4 |
+-------------+
1 row in set (0.00 sec)

mysql>


15 is replaced with the domain's ID; for details, see the query in the "CAUSE" section.

3.1.2 Insert account record:

mysql> insert into accounts(type,password) values ('plain','<NEW PASSWORD>');
Query OK, 1 row affected (0.09 sec)

mysql>


<NEW PASSWORD> is replaced with the new password for the new system user for the domain. This is the password for the domain's FTP user also.

3.1.3 Find the ID of the created record:

mysql> select * from accounts order by id desc limit 1;
+-----+-------+------------------+
| id  | type  | password         |
+-----+-------+------------------+
| 186 | plain | <NEW PASSWORD>   |
+-----+-------+------------------+
1 row in set (0.00 sec)

mysql>


3.1.4 Insert record into the sys_users table:

mysql> insert into sys_users values (4,'sb4',186,'/var/www/vhosts/domain.tld','/bin/false',0);
Query OK, 1 row affected (0.08 sec)

mysql>


<NEW USER> is replaced with the login of the new system user for the domain.tld domain, and it is also the domain's FTP user. 4 is the domain's sys_user_id; 186 is the ID of the new password.

2.2 System user does not exist.

~# grep domain.tld /etc/passwd
~#


3.2 It is recommended to re-enable physical hosting for the domain. However, please note that the entire virtual hosting directory will be overwritten and the domain content will be lost.

3.2.1 Disable hosting for the domain:

mysql> update domains set htype='none' where name='domain.tld';
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0

mysql> delete from hosting where dom_id=15;
Query OK, 1 row affected (0.00 sec)

mysql>


15 is replaced with the domain's ID; for details, see the query in the "CAUSE" section.

3.3.3 Log in to Parallels Plesk Panel and reconfigure physical hosting for the domain through Domains -> domain.tld -> Setup. Choose "Physical" hosting, and insert the new user name and password. Click "OK" to finish configuration.

Additional information

Use the following command to connect to the database of Parallels Plesk Panel:

~# mysql -uadmin -p`cat /etc/psa/.psa.shadow` psa

b8ef5052d936e902043e41759118114e a914db3fdc7a53ddcfd1b2db8f5a1b9c 29d1e90fd304f01e6420fbe60f66f838 6ef0db7f1685482449634a455d77d3f4 56797cefb1efc9130f7c48a7d1db0f0c

Email subscription for changes to this article
Save as PDF