Skip to main content
Hitachi Vantara Knowledge

Add an FTP user to a virtual server

Add a new FTP user. The user name can be a Windows or UNIX name, depending on which authentication methods are enabled in the FTP configuration. Anonymous access can also be configured, which can be restricted to read-only by changing the FTP configuration, otherwise the anonymous user will have full read-write access.

HTTP request syntax (URI)
POST <base_URI>/v8/storage/virtual-servers/{virtualServerId}/ftp/users
Parameters
Name Type Required Values Description
virtualServerId URI_PARAM Y string/number Specifies either the virtual server object ID or the HNAS storage virtual server ID.
filesystemIdBODYYstringHNAS filesystem ID that will hold the users initial directory. The filesystem should be assigned to the virtual server.
nameBODYYstringName of new FTP user. Or a special name that designates anonymous access - either "anonymous" or "ftp".
initialDirectoryBODYYstringAbsolute file system path for when the FTP user initially connects – effectively the users home directory. The path should be in UNIX format.
ensurePathExistsBODYNbooleanTrue to ensure the specified path exists. Default false.
Return codes
Code Data Description
201 ftpUser FTP user added successfully.
400 Error Message Missing or invalid request contents.
403Error MessageOperation forbidden by access level.
404 Error Message Requested resource not found.
500 Error message Error associated with the storage system.

Any HTTP status code other than 201 indicates that the API did not complete successfully.

Request example: Add new FTP user "darren" to virtual server 1
curl -vk -H "X-Api-Key: zrxvSDAv9x.RIP4gkmKarG3beF.or.4Tc2im7oeqYN88C9XPGHxbXC" https://172.17.11.11:8444/v8/storage/virtual-srevers/1/ftp/users -X POST -d '{"name":"darren", "filesystemId": "7B2638220D50FF9E0000000000000000", "initialDirectory":"/darren"}'
Response example
HTTP/1.1 201 Created
{
  "ftpUser": {
    "filesystemId": "7B2638220D50FF9E0000000000000000",
    "initialDirectory": "/darren",
    "name": "darren",
    "objectId": "313a3a3a64617272656e3a3a3a303a3a3a4f49445f24232140255f56"
  },
  "uri": "https://172.17.11.11:8444/v8/storage/ftp-users/313a3a3a64617272656e3a3a3a303a3a3a4f49445f24232140255f56"
}

 

  • Was this article helpful?