• Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
    Thank you in advance for your patience and understanding on the matter.

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