Linux vsftpd installation and configuration

2010-07-29  来源:本站原创  分类:OS  人气:227 

Ftp server vsftpd is the safest. But the configuration a little trouble for that. It is configured, can be used, but not ideal. Experienced comrades can explore.
# # Installed vsftpd
# Apt-get install vsftpd
# # Repair a configuration file
# Gedit / etc / vsftpd.conf
[B] # # configuration files as follows (reproduced) [/ b]
vsftpd set the parameters
User login control ################ ############################### ###########
# To accept anonymous users
anonymous_enable = YES
# Anonymous user login without asking password
no_anon_password = YES
# Anonymous user's home directory
anon_root = (none)
# Accept the local user
local_enable = YES
# Local user's home directory
local_root = (none)
# If the anonymous user requires a password, then use the e-mail address banned_email_file which users can not log on
deny_email_enable = YES
# Only useful when there is no version of pam verify whether the check the user has a valid shell to log in
check_shell = YES
# If this option is enabled, userlist_deny option Caibei start
userlist_enable = YES
# If it is YES, then userlist_file users can not log in for the NO, only the user can log userlist_file
userlist_deny = NO
# If and chroot_local_user with the open, the user locks the directory from / etc / passwd for each user-specified directory (this is not very clear, very familiar to you direct me which)
passwd_chroot_enable = NO
# Define anonymous login user name. The default value is ftp.
ftp_username = FTP

User Access Control ################ ############################### ###########
# Can upload (Global Control).
write_enable = YES
# Local users to upload files umask
local_umask = 022
# Upload files to use with umask
# File_open_mode = 0666
# Anonymous users can upload
anon_upload_enable = NO
# Anonymous users can build directory
anon_mkdir_write_enable = NO
Other rights of anonymous users to write (change permissions?)
anon_other_write_enable = NO
If set to YES, anonymous log in, they will be allowed to download files can be read. The default is YES.
anon_world_readable_only = YES
# If enabled, then all non-anonymous login user name will be switching to the specified user name guest_username
# Guest_enable = NO
All anonymous users to upload their files will be changed into chown_username
chown_uploads = YES
Anonymous upload their user name
chown_username = lightwiter
# If you start this function, all listed in the chroot_list_file into the root directory of the user can not change
chroot_list_enable = YES
# Allowed to use "async ABOR" command, the general not easy to go wrong
async_abor_enable = YES
ASCII mode control is available upload. The default is NO.
ascii_upload_enable = YES
# ASCII mode control is available to download. The default is NO.
ascii_download_enable = YES
# This option must specify an empty folder and any log data which did not have write permissions, when vsftpd does not require file system permissions, the user will be limited to this data folder. The default is / usr / share / empty
secure_chroot_dir = / usr / share / empty

################################ Timeout setting ############### ###############
# Idle connection timeout
idle_session_timeout = 600
# Data transmission timeout
data_connection_timeout = 120
# PAVS request timeout
ACCEPT_TIMEOUT = 60
# PROT mode connection timed out
connect_timeout = 60

################################ Server options ############## ##########
# Open journaling
xferlog_enable = YES
# Use the standard format
xferlog_std_format = YES
# When xferlog_std_format close and this option is turned on, recording all the ftp requests and responses, more useful when debugging.
# Log_ftp_protocol = NO
# Allow the use of pasv mode
pasv_enable = YES
# Close the security check, careful ah.
# Pasv_promiscuous + NO
# Allow the use of port mode
# Port_enable = YES
# Close the security check
# Prot_promiscuous
# Open tcp_wrappers support
tcp_wrappers = YES
# Define the name used by PAM, default vsftpd.
pam_service_name = vsftpd
# When the server running on the bottom using the user name
nopriv_user = nobody
# Make vsftpd command back in time pasv jump to the specified IP address. (Server connection jump?)
pasv_address = (none)

############################### Server performance option ############### ##########
# Whether to use the ls-R command to prevent waste a lot of server resources
# Ls_recurse_enable = YES
# Whether to use single-process mode
# One_process_model
# Bound to listen_port specified port, since all that is, each bound when they open, what is that standalone mode
listen = YES
# When the user logged in using the ls-al command queries like the management right of the file, the default will appear owner UID, rather than the name of the file owner. If one wants to see the name of the owner, then this feature is turned on.
text_userdb_names = NO
# Display directory list is local time or GMT time, you can mdtm order to achieve the same effect
use_localtime = NO
# Test Platform Optimization
# Use_sendfile = YES

Set ################ ############################### information class #############
# Login welcome message is displayed. If set, this setting has no effect banner_file
ftpd_banner = Welcome to Hunan 3 Chen Fake-Ta FTP site.
# Allow for the directory configured to display information, display each directory contents of the file the following message_file
dirmessage_enable = YES
# Show session state information, related!
# Setproctitle_enable = YES

########################### File defines ##################### ############
# Define can not change the user's home directory files
chroot_list_file = / etc / vsftpd / vsftpd.chroot_list
# Define restrict / allow users to log file
userlist_file = / etc / vsftpd / vsftpd.user_list
# Define login file location
banner_file = / etc / vsftpd / banner
# Prohibit the use of the anonymous user login email address as the password when
banned_email_file = / etc / vsftpd.banned_emails
# Log file location
xferlog_file = / var / log / vsftpd.log
# Directory information file
message_file =. message

########################## Directory defined ###################### ############
# Define the user profile directory
user_config_dir = / etc / vsftpd / userconf
# Define the root directory of the local user login, pay attention to the definition of the root directory can be a relative path can be absolute. Relative path is for the user home directory for the.
local_root = webdisk # this setting for each user logged in the root directory is / home / username / webdisk
# Anonymous user root after landing
anon_root = / var / ftp

######################### User connections option ##################### ############
# The acceptable maximum number of client
max_clients = 100
# Each client the maximum number of ip
max_per_ip = 5
# Using the standard 20 port to connect to the ftp
connect_from_port_20 = YES
# Bind to a IP, IP can not access other
listen_address = 192.168.0.2
# Bind to a port
# Listen_port = 2121
# Data transfer port
# Ftp_data_port = 2020
# Pasv connection mode can use upper port range, 0 arbitrary. The default value is 0.
pasv_max_port = 0
# Pasv connection mode port range can be used when the lower bound, 0 that any. The default value is 0.
pasv_min_port = 0

############################ Data transmission options ################## ############
# Anonymous user's transmission rate (b / s)
anon_max_rate = 51200
# Local user's transmission rate (b / s)
local_max_rate = 5120000

################################################## ################

Other things, if carried out to separate each user control, just create a username Xu Yao Wen Jian in user_config_dir, content Shuojuchuanshu and set up individual user rights inside the appropriate option, user defined file equally suitable for use pam Support virtual user

Annex: FTP significance of digital code
110 Restart marker response.
120 services in the long time ready.
Data link port 125 open, ready to send.
150 File status okay, open the data connection port.
200 command successful.
202 Command failed.
211 System status or system help response.
212 Directory status.
213 File status.
214 for help.
215 name of the type of system.
220 new online services ready.
221 Service closing control connection port, you can write off.
225 Data connection open, but no transfer action.
226 Closing data connection port, the requested file action.
227 entering passive mode.
230 user login.
250 Requested file action completed.
257 shows the current path name.
331 user name is correct, need password.
332 Login required account information.
350 requested action needs into one command.
421 can not provide services, closing control connection.
425 Can not open data link.
426 shut down online, to end the transmission.
450 Requested action not implemented.
451 command terminated: a local errors.
452 does not execute the command: disk space.
500 format error, command unrecognized.
501 Parameter syntax error.
502 Command failed.
503 Bad sequence of commands.
504 received the order parameter is incorrect.
530 not sign.
532 store files need to account login.
550 did not perform the requested operation.
551 request to terminate the order, type unknown.
552 termination requested file, stored bit overflow.
553 did not perform the requested command, the name is incorrect.
This requires careful study, but because it is translated, it is inevitable that inaccuracies, and English have to look to the shining.

I configured in accordance with the instructions under the access to, but how to add a virtual directory then?
I tried ln the next, but can not access the directory ln over that are not allowed to transfer directory. May be permission issues. I do not know how to solve.
Afterwards, I used the mount actually do.
File directory can be of course.
mount - bind / mnt / e / *.* / var / ftp / e
mount - bind / mnt / wind / / var / ftp / pub
# # # Of course, we hope that one can automatically mount on boot, then had to modify fstab
# Gedit / etc / fstab
# # # Add the following code format
/ Mnt / c / directory / var / ftp / mountpoint none ro, bind 0 0
# # # # But I have a small problem: can not automatically linked in the Chinese directory. But the manual does fit. Do not know how to solve.

Postscript:
I built the ftp, really want to have a domain name, windows of dynamic domain name service Tingzhi. Linux, not much. In fact, I used www.3322.org, but when the compiler error, my database is too new. But I do not want to install the old library, so that caused a series of dependencies. Then I search online to find the www.gnway.com's very nice. 2 domain name is free, first registering, then download the client. tar ** and then install the. / install.h
Before installing you must first manually create a few directories. You can install a specific look. / Install.h will prompt you for which directory needed. Carry out his own. [B] this must be hands-on, or just look never learn ah.

相关文章
  • Linux vsftpd installation and configuration 2010-07-29

    Ftp server vsftpd is the safest. But the configuration a little trouble for that. It is configured, can be used, but not ideal. Experienced comrades can explore. # # Installed vsftpd # Apt-get install vsftpd # # Repair a configuration file # Gedit /

  • Linux vsftpd installation configuration to use (more) 2010-02-26

    Linux vsftpd installation configuration to use (more) In this paper, a number of previous articles written on many occasions with their own installation and configuration experience, written in more detail, the article finally ftp command set with al

  • vsFTPd Installation and Configuration 2010-10-14

    vsFTPd Installation and Configuration vsFTPD is a small, easy to use FTP server program, is a Linux distribution in the most respected in the FTP server program, is characterized by small, light, safe to use. vsFTPd installation In the latest major r

  • Linux system installation and configuration of Apache Subversion 2010-12-23

    Linux system installation and configuration of Subversion First, the first related to the installation package is ready, I'm using the following several packages Apr: apr-1.3.8.tar.gz and apr-util-1.3.9.tar.gz Apache: httpd-2.2.14.tar.gz Subversion:

  • Linux system installation and configuration under the Apache Subversion 2010-12-23

    Linux system installation and configuration of Subversion First, the first ready-related packages, I am using here is the following a few packages Apr: apr-1.3.8.tar.gz and apr-util-1.3.9.tar.gz Apache: httpd-2.2.14.tar.gz Subversion: subversion-1.5.

  • [Reserved] Linux SVN Installation and Configuration 2011-08-27

    Linux SVN Installation and configuration of the original address: http://blog.sina.com.cn/s/blog_60be437a0100ikn0.html Linux SVN Installation and Configuration step 1 The subversion yum install subversion step 2 Installing the Linux SVN module apache

  • Linux, the installation and configuration Java, Ant 2010-12-02

    linux bash under the Java and Ant installed: For a long time under the windows programming, linux configure something on the little rusty today, look, the way summed up. Java is installed: 1, download Java installation package: find a place to downlo

  • Linux, vsftpd virtual user configuration instructions 2010-09-08

    Vsftpd virtual user configuration steps are as follows: 1, create a virtual user database 1.1, to prepare the user name, password file This file is a text file, formatted for the user name and his party, password, followed by the next line, and so on

  • [Practice has proved that finishing line] vsFTPd installation and configuration 2011-09-21

    Reference 1. VsFTPd configuration: http://www.centos.bz/2011/03/centos-install-vsftpd-ftp-server/ 2. Centos user & group permissions to add and delete users & Detailed questions: http://zh888.blog.51cto.com/1684752/385605 3. Setsebool command: htt

  • linux + snmp installation and configuration instructions 2011-07-21

    NMP (Simple Network Management Protocol, Simple Network Management Protocol), formerly known as simple gateway control protocol (SGMP), used to manage the communication line. SNMP Installation Installation # Yum install-y net-snmp net-snmp-utils net-

  • Linux (Ubuntu) installation and configuration of Samba under 2011-07-24

    1, the simple installation: sudo apt-get install samba sudo apt-get install smbfs 2, the establishment of shared folders and set permissions mkdir /home/fredric/share chmod 777 /home/fredric/share 3, smb.conf file configuration sudo gedit /etc/samba/

  • Archive Redis in Windows, linux platform installation and configuration [turn] 2011-04-25

    In order to facilitate access to information, especially the online search to Redis order related installation configuration archive: ================================================== =========== window installation platform Redis Download: http://c

  • Linux, MySQL installation and configuration, MySQL configuration arguments detailed 2010-06-18

    First, download the compiled installation # Cd / usr / local / src / # Wget http://mysql.byungsoo.net/Downloads/MySQL-5.1/mysql-5.1.38.tar.gz # Tar – xzvf mysql-5.1.38.tar.gz .. / software / #. / Configure - Prefix = / usr / local / mysql / / MySQL F

  • Linux, MySQL installation and configuration 2010-09-14

    1. Install file MySQL-devel-5.0.22-0.i386.rpm MySQL-shared-5.0.22-0.i386.rpm MySQL-server-5.0.22-0.i386.rpm MySQL-client-5.0.22-0.i386.rpm 2. Installation Installed in accordance with the above sequence rpm-ivh MySQL-devel-5.0.22-0.i386.rpm rpm-ivh M

  • linux svn installation and configuration, not with apache 2011-04-26

    http://blog.51yip.com/server/901.html Today, a colleague engaged in SVN Server , SVN Fu Wuqi I also considered Bijiao Shu Di, and when he encountered a configuration problem is the package configuration file letter authz always a problem, before when

  • linux svn installation and configuration 2010-09-04

    First, install the software to wget http://subversion.tigris.org/downloads/subversion-1.6.1.tar.gz wget http://subversion.tigris.org/downloads/subversion-deps-1.6.1.tar.gz svn's official website is http://subversion.tigris.org After extracting the ab

  • vsftpd installation and configuration instructions 2010-10-12

    1. Wget ftp://vsftpd.beasts.org/users/cevans/vsftpd-2.2.2.tar.gz 2. Tar-xvzf vsftpd-2.2.2.tar.gz 3. Cd vsftpd-2.2.2 4. Make 5. Make install 6. According to the situation the following modifications, save it as / etc / vsftpd.conf Quote # Disables ano

  • Linux, the installation of JDK and TOMCAT 2011-05-19

    Linux software installation and configuration 1. Install jdk1.6 Download jdk1.6 installation file jdk-6u10-linux-i586-rpm.bin; Application server in the foreground, the interface application server installed jdk and jre Using the root user login, the

  • Detailed installation and configuration under linux vsftp 2010-10-14

    Detailed installation and configuration under linux vsftp 1, run the command yum install vsftpd Specific details are as follows: (If you can not update, you first configure access to the Internet, I have a document called CentOS in VMware, how to net

  • Ftp under Ubuntu installation and configuration (vsftpd) 2011-07-27

    Ftp under Ubuntu software has a good variety: google this: Some of the general characteristics: wu-Ftp: relatively old, but more for its attacks, set much trouble, but more powerful. proFtpd: wu-Ftp can be achieved, and all the features of server-U.