• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Domain administrator permissions not set through API

Matthew James

Basic Pleskian
Hi,

When creating an account in Plesk using the API, the domain administrator permissions are not granted as they should be:

<?xml version="1.0" encoding="UTF-8"?><packet version="1.4.1.0"><domain>
<add>
<gen_setup>
<name>testing.co.uk</name>
<ip_address>*.*.*.*</ip_address>
<htype>vrt_hst</htype>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<ftp_login>testing.co.uk</ftp_login>
<ftp_password>********</ftp_password>
<ip_address>*.*.*.*</ip_address>
</vrt_hst>
</hosting>
<user>
<enabled>true</enabled>
<password>********</password>
<permissions>
<manage_phosting>true</manage_phosting>
<manage_ftp_password>true</manage_ftp_password>
<manage_not_chroot_shell>true</manage_not_chroot_shell>
<manage_sh_access>true</manage_sh_access>
<manage_quota>true</manage_quota>
<manage_subdomains>true</manage_subdomains>
<manage_domain_aliases>true</manage_domain_aliases>
<manage_log>true</manage_log>
<manage_anonftp>true</manage_anonftp>
<manage_crontab>true</manage_crontab>
<manage_dns>true</manage_dns>
<manage_webapps>true</manage_webapps>
<manage_maillists>true</manage_maillists>
<manage_spamfilter>true</manage_spamfilter>
<manage_drweb>true</manage_drweb>
<allow_local_backups>true</allow_local_backups>
<allow_ftp_backups>true</allow_ftp_backups>
<site_builder>true</site_builder>
<manage_dashboard>true</manage_dashboard>
</permissions>
</user>
<template-name>Linux Bronze</template-name>
</add>
</domain></packet>

Permissions have been set in the above XML packet and the response is all ok:

<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.4.1.0"><domain><add><result><status>ok</status><id>113</id></result></add></domain></packet>

However only Home page management and web statistics management permissions are given to the domain administrator when the account is created in Plesk.

I think this is a bug?

Thanks
 
I have submitted request to developers regarding this issue. Let's wait their answer. I will update thread with results.
 
It seems like the example in your documentation is wrong, if you use <perms></perms> instead of <permissions></permissions> then it works ok.
 
Thank you. I have forwarded this information to developers too.
 
You are right, the examples in documentation contain mistake. The request packets samples which operates with domain administrator's permissions should contain <perms> element instead of <permissions>.
 
hi,

I have used the code which i have mentioned below to create an account in the plesk. But I am receiving the following error. Can anybody help me regarding this issue.

Error:

SimpleXMLElement Object ( [@attributes] => Array ( [version] => 1.4.1.0 ) [system] => SimpleXMLElement Object ( [status] => error [errcode] => 1014 [errtext] => Parser error: Cannot parse the XML from the source specified ) )

Code:

<?xml version="1.0" encoding="UTF-8"?><packet version="1.4.1.0"><domain>
<add>
<gen_setup>
<name>testing.co.uk</name>
<ip_address>*.*.*.*</ip_address>
<htype>vrt_hst</htype>
<status>0</status>
</gen_setup>
<hosting>
<vrt_hst>
<ftp_login>testing.co.uk</ftp_login>
<ftp_password>********</ftp_password>
<ip_address>*.*.*.*</ip_address>
</vrt_hst>
</hosting>
<user>
<enabled>true</enabled>
<password>********</password>
<email>[email protected]</email>
<perms>
<manage_phosting>true</manage_phosting>
<manage_ftp_password>true</manage_ftp_password>
<manage_not_chroot_shell>true</manage_not_chroot_shell>
<manage_sh_access>true</manage_sh_access>
<manage_quota>true</manage_quota>
<manage_subdomains>true</manage_subdomains>
<manage_domain_aliases>true</manage_domain_aliases>
<manage_log>true</manage_log>
<manage_anonftp>true</manage_anonftp>
<manage_crontab>true</manage_crontab>
<manage_dns>true</manage_dns>
<manage_webapps>true</manage_webapps>
<manage_maillists>true</manage_maillists>
<manage_spamfilter>true</manage_spamfilter>
<manage_drweb>true</manage_drweb>
<allow_local_backups>true</allow_local_backups>
<allow_ftp_backups>true</allow_ftp_backups>
<site_builder>true</site_builder>
<manage_dashboard>true</manage_dashboard>
</perms>
</user>
<template-name>Linux Bronze</template-name>
</add>
</domain></packet>
 
can anybody help with the solution to above error?
 
Back
Top