Update FTP account's home directory

This function changes the home directory for FTP accounts.

Important:

When you disable the FTP role, the system disables this function.

SecurityBasicAuth
Request
query Parameters
user
required
string

The FTP account username.

Example: user=example1
domain
string <domain>

The user's associated domain.

Note:

The default value is the cPanel account's primary domain.

Example: domain=example.com
homedir
string <path>
Default: "user@domain/"

The FTP account's home directory

Note:

This parameter defaults to the user@domain subdirectory in the cPanel account's home directory with the name, where user and domain represent the user and domain parameters.

Example: homedir=example1/
Responses
200

HTTP Request was successful.

Response Schema: application/json
apiversion
integer

The version of the API.

func
string

The name of the method called.

module
string

The name of the module called.

object
get/Ftp/set_homedir
Request samples
uapi --output=jsonpretty \
  --user=username \
  Ftp \
  set_homedir \
  user='example1'
Response samples
application/json
{
  • "apiversion": 3,
  • "func": "set_homedir",
  • "module": "Ftp",
  • "result": {
    • "data": null,
    • "errors": null,
    • "messages": null,
    • "metadata": { },
    • "status": 1,
    • "warnings": null
    }
}