Files
webgui/plugins/dynamix/FTP.page
2020-03-04 17:33:46 +01:00

68 lines
2.1 KiB
Plaintext

Menu="NetworkServices:999"
Title="FTP Server"
Icon="icon-ftp"
Tag="globe"
---
<?PHP
/* Copyright 2005-2020, Lime Technology
* Copyright 2012-2020 Bergware International.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License version 2,
* as published by the Free Software Foundation.
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*/
?>
<?
$ftp_userlist_file = "/boot/config/vsftpd.user_list";
$ftp_userlist = "";
if (file_exists($ftp_userlist_file)) {
$ftp_userlist = str_replace("\n", " ", trim(file_get_contents($ftp_userlist_file)));
if ($ftp_userlist === false) $ftp_userlist = "";
}
$ftp_server = exec("lsof -i:21 -Pln|awk '/\(LISTEN\)/{print $2;exit}'") ? 1 : 0;
?>
<script>
$(function() {
showStatus('21');
});
</script>
<form markdown="1" method="POST" action="/update.php" target="progressFrame">
<input type="hidden" name="#command" value="/webGui/scripts/ftpusers">
_(FTP server)_:
: <select name="#arg[1]">
<?=mk_option($ftp_server, "0", _("Disabled"))?>
<?=mk_option($ftp_server, "1", _("Enabled"))?>
</select>
:help69
> Enable or disable the FTP server daemon. By default the FTP server is enabled.
> This setting is not saved, i.e. upon system reboot it will revert to its default setting.
:end
_(FTP user(s))_:
: <input type="text" name="#arg[2]" size="40" maxlength="80" value="<?=htmlspecialchars($ftp_userlist)?>">
:help70
> Enter the user names (separated by spaces) permitted to access the server using FTP.
> To disallow any user access, clear this setting.
>
> **Note:** do not enter user name `root` since this may cause problems in the future.
:end
&nbsp;
: <input type="submit" value="_(Apply)_" disabled><input type="button" value="_(Done)_" onclick="done()">
</form>
:help71
> ### Overview
>
> Unraid includes the popular `vsftpd` FTP server. The configuration of `vsftp` is currently very
> simple: **All** user names entered above are permitted to access the server via FTP and will have
> *full read/write/delete access* to the entire server, so use with caution.
:end