ftp¶
Manage FTP configuration for vsftpd server.
read¶
The read API requires an action field:
usersconfiguration
Input¶
users¶
Return the list of all configured users.
Input example:
{
"action": "users"
}
configuration¶
Return vsftpd server configuration.
Input example:
{
"action": "configuration"
}
Output¶
users¶
Output example:
{
"users": [
{
"Password": "ftppass1",
"ChrootDir": "/var/lib/nethserver/vhost/test1",
"Chroot": "enabled",
"name": "ftpu1",
"Description": ""
},
...
]
}
configuration¶
Output example:
{
"configuration": {
"status": "disabled"
}
}
validate¶
The validate API requires an action field. Valid actions are:
configurationupdatecreate
Constraint for action configuration:
- status: can be
enabledordisabled
Constraint for action create:
namemust be a non-exiting FTP user- Chroot: can be
enabledordisabled
Constraint for action update:
namemust be an existing FTP user- all other constratins from
createaction
Input¶
configuration¶
Change server configuration.
Example:
{
"action": "configuration",
"status": "enabled"
}
update¶
Update an existing user.
Example:
{
"action": "update",
"Chroot": "enabled",
"ChrootDir": "",
"Password": "mypass",
"Description": "my ftp user 1",
"name": "ftpuser1"
}
create¶
Create a new user.
Example:
{
"action": "create",
"Chroot": "enabled",
"ChrootDir": "",
"Password": "mypass",
"Description": "my ftp user 1",
"name": "ftpuser1"
}
create¶
Same input from validate API.
update¶
Same input from validate API.
Extra valid actions:
enable: enable and existing userdisable: disable an existing user
Both enable and disable action return a standard event.
Input¶
enable¶
Example:
{
"action": "enable",
"name": "ftpuser1"
}
disable¶
Example:
{
"action": "disable",
"name": "ftpuser1"
}
delete¶
Delete the given user.
Example:
{
"name": "ftpuser1"
}