• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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>123@abc.com</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