update_ftpuser()
Update an FTP user.
Signature
update_ftpuser(array $parameters): mixedParameters
Pass these parameters as KasRequestParams. Every request also requires kas_login, kas_auth_type, and kas_auth_data, as shown in SOAP with PHP.
| Name | Description | Requirement |
|---|---|---|
ftp_login |
The login to update | Required |
ftp_path |
The path of the login | Optional |
ftp_new_password |
The new FTP password | Optional |
ftp_comment |
The comment | Optional |
ftp_permission_read |
The user may read: Y|N | Optional |
ftp_permission_write |
The user may write: Y|N | Optional |
ftp_permission_list |
The user may list directories: Y|N | Optional |
ftp_virus_clamav |
Virus protection for the user: Y|N | Optional |
PHP example
<?php
// $sessionToken is returned by KasAuth, see SOAP with PHP.
$parameters = [
'ftp_login' => 'f0123456',
'ftp_new_password' => 'new_password',
'ftp_path' => 'directory',
'ftp_comment' => 'comment',
'ftp_permission_read' => 'Y',
'ftp_permission_write' => 'N',
'ftp_permission_list' => 'Y',
];
try {
$client = new SoapClient('https://kasapi.kasserver.com/soap/wsdl/KasApi.wsdl');
$response = $client->KasApi(json_encode([
'kas_login' => 'w0123456',
'kas_auth_type' => 'session',
'kas_auth_data' => $sessionToken,
'kas_action' => 'update_ftpuser',
'KasRequestParams' => $parameters,
]));
print_r($response);
} catch (SoapFault $fault) {
echo 'Error: ' . $fault->faultstring;
}
Responses and error codes
-
TRUEthe action was carried out -
missing_parametera required parameter is missing -
in_progressthe KAS object is currently being processed -
nothing_to_donothing was changed -
ftp_comment_syntax_incorrect -
ftp_login_not_found -
ftp_login_syntax_incorrect -
ftp_path_syntax_incorrect -
ftp_permission_list_syntax_incorrect -
ftp_permission_read_syntax_incorrect -
ftp_permission_write_syntax_incorrect -
ftp_virus_clamav_syntax_incorrect -
password_syntax_incorrect