Configuration Guide FTP Server Configuration
Enable or Disable the FTP Server
By default, the FTP Server is disabled. To enable the FTP server, run the ftp-server enable
command in the global configuration mode. It should be noted that the FTP client cannot
access the FTP server before you configure the top directory, login user name and password of
the FTP server. So it is recommended to refer to the later sections to configure the top directory,
login user name and password before enabling the FTP Server for the first time.
To disable the FTP server, run the no ftp-server enable command in the global configuration
mode.
Ruijie(config)# ftp-server enable
Ruijie(config)# no ftp-server enable
In real network, only one client is allowed to access the FTP server at a time.
Configure the Top Directory
The function limits the range that the FTP client can access. (For the details on how to view
and manage the directories on the device, refer to File System Configuration Guide.) For
instance, you can set the top directory to the “/syslog” directory. After logging in the FTP Server,
the FTP client can access only the files and folders under the “/syslog” directory.
To configure the top directory, run the ftp-server topdir command in the global configuration
mode. The no form of this command removes the top directory configuration and prohibits the
FTP client to access any files on the FTP server.
Ruijie(config)# ftp-server topdir directory
Configures the top directory of the FTP
Server.
Ruijie(config)# no ftp-server topdir
Removes the top directory configuration and
prohibits the FTP client to access any files
on the FTP server.
Assume that log files are stored under the “/syslog” directory. To download log files from a
device through the FTP client on the management PC while prohibiting the FTP client from
accessing the files other than the “/syslog” directory, configure the top directory as below:
Ruijie(config)# ftp-server topdir /syslog