Set FTP user root dir

				
					StructOperationResponse WebHostingFTPUserUpdate(string $IDsession, string $id, string $action, array $params)
			

Change the root directory of a FTP user.

REQUIRED

  • idSession string (32)
    Session ID.
  • id string
    Hosting ID.
  • action string
    Set to “SetRootDir”.
  • params array
    {“username”: Name of the user,

    “rootDir”: Path of the user’s root directory starting from the root of the hosting,}

An Object of type StructOperationResponse

<?php 
$clientSOAP = new SoapClient("http://URL.wsdl");
 
try 
{
    $params = array("username" =>"admin",
         "rootDir" => "/ftp",
        );
 
    $idSession = $clientSOAP->sessionOpen("XX000", "xxxxxxxx"); 
    $clientSOAP->WebHostingFTPUserUpdate($idSession, "NW1024", "SetRootDir", $params)); 
}
catch(SoapFault $fault) 
{
    echo "Exception : " .$fault->getMessage(). "\n"; 
}
 
if (isset($idSession)) 
{
    $clientSOAP->sessionClose($idSession); 
}