• The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

API not making domains where it should or setting proper persmission when created

E

eli007

Guest
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
-------------------------------------------------------------------
Plesk 10.1, CentOS 5.5 x86


PROBLEM DESCRIPTION AND STEPS TO REPRODUCE
-------------------------------------------------------------------
1) The subdomain folder is being created in /subdomains/{subdomain}/ and not where I specified it in the XML configuration via : <home>/httpdocs/users/{subdomain}</home>. This isn't a complete downside, but it leads me to problem #2 but I hope to fix.

2) The folder created in the /subdomain folder is owned by root and not by the user, so this folder becomes impossible modify or upload to unless a chown -R is given to /subdomains/{subdomain}

3) As per the API documentation you can add an FTP account along with the subdomain, this so far (no matter what I tried) isn't the case and does not execute as expected.

This is my XML that I am running:

$sub = 'test12';
$p = '<?xml version="1.0" encoding="UTF-8" standalone="no"?>';
$p .= '<packet version="1.5.2.0">';
$p .= ' <subdomain>';
$p .= ' <add>';
$p .= ' <parent>foo.com</parent>';
$p .= ' <name>'.$sub.'</name>';
$p .= ' <home>/httpdocs/users/'.$sub.'</home>';
$p .= ' <property>';
$p .= ' <name>php</name>';
$p .= ' <value>true</value>';
$p .= ' </property>';
$p .= ' <property>';
$p .= ' <name>ftp_login</name>';
$p .= ' <value>test-ftp</value>';
$p .= ' </property>';
$p .= ' <property>';
$p .= ' <name>ftp_password</name>';
$p .= ' <value>test-pwd</value>';
$p .= ' </property>';
$p .= ' </add>';
$p .= ' </subdomain>';
$p .= '</packet>';


ACTUAL RESULT
-------------------------------------------------------------------
Subdomain created under root as: /subdomain/{subdomain} with root as owner not user


EXPECTED RESULT
-------------------------------------------------------------------
Subdomain to be created as specified in the <home/> tags, with owner being user


ANY ADDITIONAL INFORMATION
-------------------------------------------------------------------
I need to do a chown -R {user}:psacln /subdomain/{subdomain} to get some flexibility so I can upload files into the subdomain folder.
 
Last edited by a moderator:
Back
Top