Linux vsftpd installation configuration to use (more)

2010-02-26  来源:本站原创  分类:OS  人气:363 

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 all the configuration properties vsftpd.conf comments. If the problem please reply to me, thanks!

1. Directly to the vsftpd site (ftp://vsftpd.beasts.org/users/cevans/) download the latest source package tar.gz format
2. # Extract $ tar-zxf vsftpd-xx.tar.gz
$ Cd. / Vsftpd-xx
# Compile
make
make install
# If the make install does not install the file, you may need to manually execute the following command
cp vsftpd / usr / local / sbin / vsftpd
cp vsftpd.conf.5 / usr/local/share/man/man5
cp vsftpd.8 / usr/local/share/man/man8
cd. / EXAMPLE / INTERNET_SITE
cp vsftpd.conf / etc
cp vsfpd.xinetd / etc / xinetd.d / vsftpd
/ Etc / rc.d / init.d / xinetd restart or service xinetd restart
###### Without xinetd service, the command $ yum install xinetd
3. To set up an independent startup mode, then in / etc / xinetd.d / vsftpd file to disable = no change YES
In / etc / vsftpd.conf file:
Add listen = yes This turned into a STANDALONE standalone mode
4. Anonymous login configuration:
Changes (if you do not modify the default is) anonymous_enable = YES
anon_root = / sunwill # anonymous login directory
anon_no_anon_password = YES # do not prompt for a password is prompted for a password NO other attributes, such as for the article last part of the configuration properties list (anonymous general with anon), he will need to add or modify
6. The local user first cp RedHat / vsftpd.pam / etc / pam.d / ftp (copy local user authentication pam file, not this step will not be able to use local user login!)
Modify or add:
local_enable = YES
write_enable = YES
local_umask = 022
local_root = / sunwill # local user is logged on the default directory, if not for local users which are logged the original default directory, can be used usermod to modify (usermod-d / dir user).
7. Virtual user configuration:
(1). Generate virtual user password database file. In order to establish the password database file, first generate a text file. The document follows the format of the singular behavior of the user name, and even acts Password:
# Vi account.txt
ylg
1234
zhanghong
4321
gou
5678
(2). Generate password database file, and modify its permissions:

db_load-T-t hash-f. / account.txt / etc / vsftpd / account.db
chmod 600 / etc / vsftpd / account.db
(To change the user delete account.db, then db_load)

If not db_load can copy from the CD the first few on the db4 rpm file to install (rpm-ivh *. rpm).

Download: http://download.fedora.redhat.com/pub/fedora/linux/core/6/i386/os/Fedora/RPMS/
Command $ rpm-q db4 check
If it has loaded, then download the db4-java-4.3.29-9.fc6.i386.rpm,
db4-tcl-4.3.29-9.fc6.i386.rpm, db4-utils-4.3.29-9.fc6.i386.rpm three packages
Db4 is not installed if more than download the db4-4.3.29-9.fc6.i386.rpm, db4-devel-4.3.29-9.fc6.i386.rpm two packages. Use rpm-ivh *. rpm to install the downloaded package
(3). Create a virtual user's PAM file. Add the following two lines:
# Vi / etc / pam.d / vsftp.vu
auth required / lib / security / pam_userdb.so db = / etc / vsftpd / account
account required / lib / security / pam_userdb.so db = / etc / vsftpd / account
(4). Create a virtual user, set the user to access the directory, and set the virtual user access permissions:
useradd-d / ftpsite virtual_user
chmod 777 / ftpsite # # # allow all users to read and write operations through the steps of setting, / ftpsite is virtual_user user's home directory, the user is / ftpsite directory owners.
(5) in / etc / vsftpd.conf add
guest_enable = YES
guest_username = virtual_user
pam_service_name = vsftp.vu
(6), stop here already in use account.txt ftp account password
As for the change the permissions for each user be admitted to add vsftpd.conf
user_config_dir = user profile directory, such as user_config_dir = / etc / vsftpd /
First mkdir / etc / vsftpd
Then create the directory and user name the same name documents, such as $ vi / etc / vsftpd / gou
And add the permissions attributes, as follows:
write_enable = NO # can be written
anono_upload_enable = NO # can upload their own view of other properties can configure the properties increased.
(7) start the ftp, / etc / local / sbin / vsftpd &
(8) Linux ftp command to connect: ftp 192.168.18.107 # The following is the command input window information
Connected to 127.0.0.1.
220 (vsFTPd 2.0.5)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (127.0.0.1: root): gou
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
As shown, said a successful connection
8. Settings switched on (1) We will set it in front of an independent startup mode, to start running in the / etc / vsftpd.conf the listen = YES listen = NO or the comment to (2) # vi / etc / xinetd.d / vsftpd
Will disable = YES to disable = NO
(3) # service xinetd restart ftp 127.0.0.1 test available at this time
9. Ftp client commands
FTP command line format is:
ftp-v-d-i-n-g [host name], where
-V display all of the remote server response information;
-N limit ftp automatic login, which does not use;. N etrc documents;
-D Use debugging mode;
-G cancellation of global file names.
FTP uses an internal command is as follows (in brackets indicate optional):
<1>.! [Cmd [args]]: the local machine in the interactive shell, exit back to ftp the environment, such as:! Ls *. zip
<2>. $ Macro-ame [args]: implementation of the macro definition of macro-name.
<3>. Account [password]: after the success of the remote system to provide login access to system resources required to add a password.
<4>. Append local-file [remote-file]: Append a local file to the remote system host, if no file name specified remote system, use the local file name.
<5>. Ascii: ascii type transfer method to use.
<6>. Bell: After each command the computer beep once.
<7>. Bin: use binary file transfer mode.
<8>. Bye: exit the ftp session process.
<9>. Case: when using the mget, the remote host file name in uppercase to lowercase letters.
<10>. Cd remote-dir: enter the remote host directory.
<11>. Cdup: remote host directory into the parent directory.
<12>. Chmod mode file-name: the file-name remote host file access mode set to mode,
Such as: chmod 777 a.out.
<13>. Close: interrupt a session with the remote ftp server (and open correspondence).
<14>. Cr: transfer files using asscii way, it will be converted to carriage return line feed back line.
<15>. Delete remote-file: Delete the remote host file.
<16>. Debug [debug-value]: set the debug mode, showing each to send commands to the remote host, such as: deb up 3, if set to 0, said the cancellation of debug.
<17>. Dir [remote-dir] [local-file]: Display the remote host directory, and the results into a local file
<18>. Disconnection: the same close.
<19>. Form format: the file transfer mode is set to format, the default mode for the file.
<20>. Get remote-file [local-file]: the remote host's file remote-file transmitted to the local hard disk of the local-file.
<21>. Glob: Set mdelete, mget, mput file name extension, the default file name without extension, with the-g command line parameter.
<22>. Hash: 1024 bytes per transmission, display a hash sign (#).
<23>. Help [cmd]: show ftp command cmd inside the help information, such as: help get.
<24>. Idle [seconds]: remote server, set the sleep timer [seconds] seconds.
<25>. Image: set binary transfer mode (same binary).
<26>. Lcd [dir]: switch to the local working directory dir.
<27>. Ls [remote-dir] [local-file]: display the remote directory remote-dir, and into the local file local-file.
<28>. Macdef macro-name: define a macro, the next encounter macdef empty row, the end of the macro definition.
<29>. Mdelete [remote-file]: Remove the remote host file.
<30>. Mdir remote-files local-file: with dir like, but can specify multiple remote files,
Such as: mdir *. o. *. zipoutfile.
<31>. Mget remote-files: multiple remote file transfer.
<32>. Mkdir dir-name: in the remote host in the construction of a catalog.
<33>. Mls remote-file local-file: with nlist, but can specify multiple file names.
<34>. Mode [modename]: the file transfer mode is set to modename, the default mode for the stream.
<35>. Modtime file-name: display the remote host file was last modified.
<36>. Mput local-file: multiple file transfer to remote host.
<37>. Newer file-name: If the remote machine in the file-name modification time than the local hard disk the same name of the document is more recent, then retransmit the file.
<38>. Nlist [remote-dir] [local-file]: Display the remote host directory of the file list and into your local hard disk of the local-file.
<39>. Nmap [inpattern outpattern]: Set the file name mapping mechanism, makes the file transfer, file some of the characters in one another, such as: nmap $ 1. $ 2. $ 3 [$ 1, $ 2]. [$ 2, $ 3], then transfer files a1.a2.a3, the file name into a1, a2. The order applies to the remote host special non-UNIX machine situation.
<40>. Ntrans [inchars [outchars]]: set file name character translation mechanism, such as ntrans1R, the file name LLL will become RRR.
<41>. Open host [port]: specify the ftp server to establish connections, can be specified port.
<42>. Passive: to enter the passive transmission.
<43>. Prompt: set up multiple file transfer interaction when prompted.
<44>. Proxy ftp-cmd: in the secondary control connection, execute a ftp command, which allows to connect the two ftp servers to transfer files between two servers. The first ftp command must be open, to first establish a connection between the two servers.
<45>. Put local-file [remote-file]: the local file local-file sent to the remote host.
<46>. Pwd: display current working directory of the remote host.
<47>. Quit: with the bye, exit the ftp session.
<48>. Quote arg1, arg2 ...: verbatim the parameters sent to a remote ftp server, such as: quote syst.
<49>. Recv remote-file [local-file]: with the get.
<50>. Reget remote-file [local-file]: similar to get, but if local-file exists, the last transmission from the left off the resume.
<51>. Rhelp [cmd-name]: request access to the remote host for help.
<52>. Rstatus [file-name]: If you do not specify a file name, then display the status of the remote host, or display the file status.
<53>. Rename [from] [to]: change the file name of the remote host.
<54>. Reset: Clear answer queue.
<55>. Restart marker: marker Department from the specified symbol, to start get or put, such as: restart 130.
<56>. Rmdir dir-name: Remove the remote host directory.
<57>. Runique: Set the file name of only one store, if the file exists, then the original file with the suffix .1, .2 and so on.
<58>. Send local-file [remote-file]: with the put.
<59>. Sendport: set the PORT command.
<60>. Site arg1, arg2 ...: the parameters as the SITE command sent to the remote ftp host verbatim.
<61>. Size file-name: display the size of the remote hosts file, such as: site idle 7200.
<62>. Status: Displays the current status of ftp.
<63>. Struct [struct-name]: the file transfer structure is set to struct-name, the default use of stream structure.
<64>. Sunique: remote host file name is stored is set to only one (corresponding with the runique).
<65>. System: show the remote host's operating system type.
<66>. Tenex: the file transfer type to TENEX machines of the type required.
<67>. Tick: to set the byte transfer counter.
<68>. Trace: setting package tracking.
<69>. Type [type-name]: set file transfer type to type-name, default is ascii, such as: type binary, set the binary transfer mode.
<70>. Umask [newmask]: remote server's default umask is set to newmask, such as: umask 3
<71>. User user-name [password] [account]: remote host to identify themselves, need password, you must enter the password, such as: user anonymous my @ email.
<72>. Verbose: with the-v command line parameters that set the detailed reporting, ftp server, all responses will be displayed to the user, the default is on.

----------- Vsftpd. Conf configuration file attributes --------------
anonymous_enable = NO to disable anonymous user
no_anon_password = YES requires a password
anon_root = / var / ftp anonymous user's default home directory
local_enable = NO disables local user
local_root = webdisk local user's home directory (relative path is relative to the user's home directory, absolute path is that all users can log on to this directory, for example: / localftp)
guest_enable = NO Disable gust Users
ftp_username = ftp anonymous user name (default still anonymous use)

Access Control

write_enable = YES local user can write
local_umask = 022 umask Upload file
file_open_mode = 0666 use of papers
anon_upload_enable = NO anonymous users can not upload
anon_mkdir_write_enable = NO anonymous users can not write to build directories
anon_other_write_enable = NO anonymous users can not do other write operations
anon_world_readable_only = YES anonymous users can read files
# Chown_uploads = YES modify the uploaded file owner
# Chown_username = ftpadmin modify the uploaded file owner for the XXX
ascii_upload_enable = NO does not use ascii upload files
ascii_download_enable = NO does not use ascii download

secure_chroot_dir = / usr / share / empty default values

Timeout Control

idle_session_timeout = 600 600 seconds idle timeout
data_connection_timeout = 120 transmission timeout 120 seconds
accept_timeout = 60 pasv mode wait time 60 seconds
connect_timeout = 60 port mode wait time 60 seconds

Service Control

xferlog_enable = YES start logging
xferlog_std_format = YES to use the standard log format
xferlog_file = / var / log / vsftpd.log log default location
pasv_enable = YES to enable passive mode
# Port_enable = YES to enable active mode
# Note here pasv and the port can only write one, not a YES, one NO, to let the other does not work, can only use # comment out, or be wrong.
features enable tcp_wrappers tcp_wrappers = YES
nopriv_user = nobody least privilege users

listen = YES to use standalone mode (recommended)

Show Information

ftpd_banner = welcome to ftp. login welcome message
dirmessage_enable = YES when prompted to start the switch catalog features directory information
message_file =. message prompts the contents of the file directory

Setting file permissions
chroot_list_enable = YES start the user directory restriction feature
chroot_list_file = / etc / vsftpd / vsftpd.chroot_list this file to other users can not change the outer directory.

userlist_enable = YES start user limit function
userlist_deny = YES userlist file in the user log ban, NO, then only the user can log on userlist
userlist_file = / etc / vsftpd / vsftpd.user_list ban log file name and location of the user list (can be customized)

user_config_dir = / etc / vsftpd / userconf / special settings for individual user configuration files (in this directory to establish the corresponding "user" files, file write
write_enable = YES
anon_world_readable_only = NO
anon_upload_enable = YES
anon_mkdir_write_enable = YES
anon_other_write_enable = YES and other rights of information, this user will have here written permission)

Connection options
max_clients = 100 maximum number of connections
max_per_ip = 5 the maximum number of connections per ip
connect_from_port_20 = YES to enable the port to transfer data 20
# Listen_address = 192.168.0.2 the ip address of the designated listener, if you have more than one ip, then
listen_port = 21 listening on port number
ftp_data_port = 20 data port

pasv_max_port = 40000 passive mode port number of the limit (0 is not limited to)
pasv_min_port = 30000 passive mode port number of the lower limit (0 for the Open)

Data transfer rate

anon_max_rate = 51200 anonymous users maximum transfer rate
local_max_rate = 5120000 maximum transmission rate of the local user

相关文章
  • 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

  • Linux vsftpd.conf configuration parameters 2010-03-09

    vsftpd.conf configuration parameters configure vsftp with detailed finishing the last few days took a long time did not make things right, and now finally realized I wanted, and the following is accumulated during the configuration files on some of t

  • 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 /

  • Vsftpd installation configuration 2011-03-02

    1 install using rpm package here (with source installation problems, can not be configured). # Rpm-ivh vsftpd-2.0.1-5.i386.rpm can wait for the installation is complete. service vsftpd start service vsftpd start If you do not set any circumstances, c

  • Linux Apache installation. Configuration manuscript 2010-06-11

    Original square address: http://www.kreny.com/computer/linux/apache.html Apache 1.3.33 and PHP 4.3.10 build dynamic and static modules installed Apache 2.0.48 (draft) Configuring Apache 2.0.48 (draft) Use mod_limitipconn.c to limit the number of conc

  • rookie under linux mysql installation configuration chapter I 2011-04-21

    1, download the installation file to install MySQL MySQL need the following two files: MySQL-server-4.0.23-0.i386.rpm MySQL-client-4.0.23-0.i386.rpm Download address: http://www.mysql.com/downloads/mysql-4.0.html , open this page, scroll down page to

  • red hat linux 5 installation configuration under tomcat 2010-05-03

    1, From apache-tomcat-5.5.28.tar.gz to / software directory 2, tar-xzvf apache-tomcat-5.5.28.tar.gz extracting file 3, set the tomcat from the start vi / etc / rc.local JAVA_HOME = / usr/java/jdk1.6.0_16 / export JAVA_HOME / Software/apache-tomcat.5.

  • linux + nginx installation configuration and use 2011-07-23

    Preparation: # Yum install gcc gcc-cpp gcc-c + + Installing pcre (Let nginx support rewrite) # Tar zxvf pcre-8.01.tar.gz # Cd pcre-8.01 / #. / Configure # Make & & make install Installed and enabled # Tar zxvf nginx-1.0.4.tar.gz # Cd nginx-1.0.4 #

  • rad hat linux 5 installation configuration under the jdk 2010-05-03

    1, download jdk-6u16-linux-i586-rpm.bin, and then upload it to / software directory 2, chmod 755 jdk-6u16-linux-i586-rpm.bin 3, ./jdk-6u16-linux-i586-rpm.bin 4, set global environment variables jdk default is installed in / usr/java/jdk1.6.0_16 direc

  • Vsftpd in the SuSE Linux operating system installation configuration (change) 2010-04-20

    Two days to install and configure the Suse FTP encountered many problems, here to do some summing up: First, install the Suse's graphical user interface to do very well, so the installation process is relatively simple. 1, open Yast, Software → Softw

  • vsftpd install the SuSE Linux operating system configuration 2010-09-08

    First, install the Suse's graphical user interface to do very well, so the installation process is relatively simple. 1, open Yast, Software → Software Management; 2, just started using Suse's software manager is very accustomed to, can not find wher

  • 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

  • JDK1.6 installation configuration under the LINUX 2010-03-25

    http://developer.51cto.com/art/200907/134477.htm DK1.6 under the LINUX install and configure Java for beginners is a must to start Java programming, how JDK1.6 installation and configuration under the LINUX became the primary issue, then this article

  • oracle - Linux - Unix under the ODBC installation. Configuration and Programming 2010-04-12

    Transfer from: http://linux.sheup.com/linux/linux3962.htm Linux / Unix under the ODBC installation, configuration and programming 2004-04-23 15:18 pm From: Linux documents are shown: Www.8s8s.coM Address: unknown Content: ODBC principle Linux / Unix

  • Vsftpd install the SuSE Linux operating system configuration (change) 2010-04-20

    Two days to install and configure the Suse FTP encountered many problems, here to do some summing up: First, install the Suse's graphical user interface to do very well, so the installation process is relatively simple. 1, open Yast, Software → Softw

  • Linux vsftpd configuration Daquan 2010-07-29

    VSFTPD rookie articles This is my rookie learning LINUX first article written, it is more application-based FTP set up, if I have any questions please write more than teach, I will continue to follow the Advanced chapter to the various detailed FTP c

  • Linux Knowledge IX: LAMP.phpMyAdmin installation. Configuration. Integration and use of Detailed 2010-11-12

    Linux system installation and use of bear in mind: 1, view the permissions are allowed. 2, see whether the subsidiary version of the corresponding software version. 3, the view directory services directory is corresponding with the operation. apache

  • 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 Knowledge nine: LAMP.phpMyAdmin installation. Configuration and use of Detailed Integration 2010-11-12

    Linux system installation and use of remember: 1, view privileges are allowed. 2, check whether the version with the version of the software corresponding to the subsidiary. 3, view the directory services directory is corresponding with the operation

  • Analysis of the vsftpd server installation configuration and mount the ftp address is mapped to the local method 2010-12-21

    Analysis of the vsftpd server installation configuration and mount the ftp address is mapped to the local method 1 install ftp server daemon program luther @ gliethttp: ~ $ sudo apt-get install vsftpd luther @ gliethttp: ~ $ sudo mkdir-p / home / ftp