It depends on the FTP server.
You may be able to use the site() command, try something like:
site("SITE PSWD " + oldPwd + " " + newPwd);
This is entirely dependent on your FTP server and is probably not supported. Your server may have a different site command.
Suppose, I am a user who is logged on to the FTP diamond server. How can I change my password without asking server's administrator? Is there any way to do this?