FTP Server Configuration in Linux
Short for File Transfer Protocol, the protocol for exchanging files over the Internet or network.
How to start FTP Service
#root@localhost#/etc/init.d/vsftpd start
#root@localhost#/etc/init.d/vsftpd stop
#root@localhost#/etc/init.d/vsftpd restart
VSFTPD to start at boot you can use the chkconfig command
#root@localhost#chkconfig vsftpd on
Test the VSFTPD Server Status
#root@localhost#netstat -a | grep ftp
tcp 0 0 *:ftp *:* LISTEN
The vsftpd.conf File
VSFTPD only reads the contents of its vsftpd.conf configuration file you'll have to restart VSFTPD each time you edit the file in order for the changes to take effect. The file may be located in either the /etc or the /etc/vsftpd VSFTPD runs as an anonymous FTP server you want any remote user to log into to your default FTP directory using a username of anonymous and a password
#anon_root=/data/ftp
VSFTPD allows only anonymous FTP downloads to remote users, not uploads from them. This can be changed by modifying the anon_upload_enable VSFTPD doesn't allow anonymous users to create directories on your FTP server. You can change this by modifying the anon_mkdir_write_enable. VSFTPD logs FTP access to the /var/log/vsftpd.log log file. You can change this by modifying the xferlog_file directive. By default VSFTPD expects files for anonymous FTP to be placed in the /var/ftp directory
# Allow anonymous FTP?
anonymous_enable=YES
#The directory which vsftpd will try to change
#into after an anonymous login. (Default = /var/ftp)
anon_root=/data/directory
...
# Uncomment this to allow local users to log in.
local_enable=YES
...
#Uncomment this to enable any form of FTP write command.
#Needed even if you want local users to be able to upload files)
write_enable=YES
...
# Uncomment to allow the anonymous FTP user to upload files. This only
# has an effect if global write enable is activated. Also, you will
#obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
...
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
...
# Activate logging of uploads/downloads.
xferlog_enable=YES
...
# You may override where the log file goes if you like.
# The default is shown below.
xferlog_file=/var/log/vsftpd.log
Other vsftpd.conf Options
Limiting the maximum number of client connections (max_clients) Limiting the number of connections by source IP address (max_per_ip) The maximum rate of data transfer per anonymous login. (anon_max_rate) The maximum rate of data transfer per non-anonymous login. (local_max_rate)
The /etc/vsftpd.ftpusers File
you may restrict FTP access to certain users by adding them to the list of users in the /etc/vsftpd.ftpusers file
FTP Greeting Banner
ftpd_banner= Welcome to FTP Server
No comments:
Post a Comment