• 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

Resolved XML API returns an error when changing a website's document root on Windows-servers

JanReilink

New Pleskian
Username:

TITLE

XML API returns an error when changing a website's document root on Windows-servers

PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE

Plesk Obsidian 18.0.49 and up

PROBLEM DESCRIPTION

Since Plesk Obsidian 18.0.49, the XML API always returns an error when changing a website's document root on Windows-servers, even when using the current document root:

"The specified directory name contains symbols that cannot be used."

This is probably caused by this change in 18.0.49: It is no longer possible to change a website’s document root to a directory whose name contains one or more white space characters via XML-RPC. (PPPM-13777)

STEPS TO REPRODUCE

Setting the document root (hosting property
Code:
www_root
) of a website on a Windows Server using the XML API

ACTUAL RESULT

The error "The specified directory name contains symbols that cannot be used." is returned

EXPECTED RESULT

No error is returned, and the website's document root is updated (or kept the same, if the current value was passed to the API)

ANY ADDITIONAL INFORMATION

This is probably caused by this change in 18.0.49: It is no longer possible to change a website’s document root to a directory whose name contains one or more white space characters via XML-RPC. (PPPM-13777)

YOUR EXPECTATIONS FROM PLESK SERVICE TEAM

Confirm bug
 
That response makes no sense.

www_root is the identifier of the property in question, it's not something you can change at will. It's the value of this property that is rejected by Plesk, not its name.
 
That response makes no sense.

www_root is the identifier of the property in question, it's not something you can change at will. It's the value of this property that is rejected by Plesk, not its name.
@Onno Molenkamp, the Plesk XML API is rather elaborate. With the many, many, options available it's hard recognize that www_root is actually the identifier of a property and not a value. Let alone knowing to which descriptor the www_root property belongs to.

Providing as many details as possible, such as the full API packet, helps the Plesk staff to understand and triage issue's better.
 
it's hard recognize that www_root is actually the identifier of a property and not a value
That's why @JanReilink specifically mentioned "the hosting property www_root", there's no ambiguity there.

It happens with every Windows path, even when first requesting the current value of www_root, and then trying to set that very same value. (which obviously shouldn't happen — the current value should always be valid)

Again, it looks like the validation code that was added in 18.0.49 for the resolution of PPPM-13777 simply doesn't handle Windows paths, at all. (Windows paths contain colons and backslashes, which Linux paths do not)

Sample request:
XML:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<packet>
    <webspace>
        <set>
            <filter>
                <id>56</id>
            </filter>
            <values>
                <hosting>
                    <vrt_hst>
                        <property>
                            <name>www_root</name>
                            <value>D:\www\example.com\www</value>
                        </property>
                    </vrt_hst>
                </hosting>
            </values>
        </set>
    </webspace>
</packet>
Response:
XML:
<?xml version="1.0" encoding="UTF-8"?>
<packet version="1.6.9.1">
    <webspace>
        <set>
            <result>
                <status>error</status>
                <errcode>2204</errcode>
                <errtext>The specified directory name contains symbols that cannot be used.</errtext>
                <filter-id>56</filter-id>
                <id>56</id>
            </result>
        </set>
    </webspace>
</packet>
 
Guys, sorry, but the only simple question I had was if the same is happening when wwwroot is trying to be set. I was asking that to make it a faster and easier process for engineers to verify the report.

Anyway, I will now proceed and forward the report "as is".
 
The issue ID will show up in the change log once it is fixed, or a fix will be reported by staff here.
 
Plesk Obsidian 18.0.51: It is now again possible to change a website’s document root directory via the RPC API. (PPPM-13915)
 
Back
Top