Centos installation and configuration under the vsftp (rpm)

2011-09-15  来源:本站原创  分类:OS  人气:168 

yum install vsftpd

2 start / restart / shut down vsftpd server
[Root @ localhost ftp] # / sbin / service vsftpd restart
Shutting down vsftpd: [OK]
Starting vsftpd for vsftpd: [OK]
OK indicates that the restart was successful.
Startup and shutdown were to restart to start / stop can be.
If the source installation to the installation folder and find start.sh shutdown.sh files, execute them on it.

3 and vsftpd server-related files and folders
vsftpd server's configuration file is: / etc / vsftpd / vsftpd.conf

vsftpd server's root directory, the FTP server's home directory:
In / var / ftp at the pub at the server if you want to change the directory path, then you just modify the / var / ftp to somewhere else on the line

4. Add some local users FTP FTP server requires a username and password to log, because the FTP user and set permissions.
FTP users can not log into the system generally, their only access to the FTP server directory, which is for security, so that the user is called a virtual user in fact is not really a virtual user, but can not log SHELL of it, did not ability to log system.

/ Usr / sbin / adduser-d / opt / test_ftp-g ftp-s / sbin / nologin test
This command means:
Use the command (adduser) add test users can not log (-s / sbin / nologin), in its own folder in the (-d / opt / test_ftp)), belongs to the group ftp (-g ftp)
Then you need to set password passwd test for it
This will add an FTP user. The following example can help you enter the FTP server.

[Root @ localhost ftp] # ftp
ftp> open 192.168.0.33
Connected to 192.168.0.33 (192.168.0.33).
220 (vsFTPd 2.0.5)
Name (192.168.0.33: gxl): test
331 Please specify the password.
Password:
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> quit
221 Goodbye.

In the windows, as long as the browser, enter the ftp://192.168.0.33 into the FTP server, then right-login, enter your user name and password to log in to your directory.
Of course, you have to ensure that he can read and write their own directory, it is necessary to set in the configuration file vsftpd.conf in what you can read and write the.
local_enable = yes
write_enable = yes
local_umask = 022

5 anonymous upload to download configuration files to modify vsftpd.conf, identified the following few lines, do not own to add into it.
anonymous_enable = yes
anon_upload_enable = yes
anon_mkdir_write_enable = yes
anon_umask = 022

Then you can create a new folder, change its permissions to completely open, any user can log in this folder, and upload and download files:
mkdir / var / ftp / guest
chmod 777 / var / ftp / guest

6 custom welcome message into an FTP server set up in the vsftpd.conf file:
dirmessage_enable = yes
Then enter a user directory. Message file, enter the welcome message can be (I write here is Welcome to gxlinux's FTP!):
[Root @ localhost test_ftp] # ftp 192.168.0.33
Connected to 192.168.0.33 (192.168.0.33).
220 (vsFTPd 2.0.5)
Name (192.168.0.33: gxl): test
331 Please specify the password.
Password:
230-Welcome to gxlinux's FTP!
230 Login successful.
Remote system type is UNIX.
Using binary mode to transfer files.

7 virtual path to a directory under the mount to the FTP server for users, which is called the virtual path.
Such as a directory to mount the gxl user to the FTP server, FTP server for users, use the following command:
[Root @ localhost opt] # mount - bind / home / gxl / var / ftp / pub # the mount command
[Root @ localhost opt] # ls / var / ftp / pub
LumaQQ Screenshot.png Desktop

8 Open vsFTPd logging add the following line to the vsftpd.conf file, under normal circumstances there is this line in the file, as long as the comment symbol # in front can be removed, if it does not add or modify:
xferlog_file = / var / log / vsftpd.log

9 limit the number of links, and links to the largest number of each IP modify the configuration file, for example, the maximum supported number of links vsftp 100, each IP can support five links:
max_client = 100
max_per = 5

10. To limit the transmission rate to modify the configuration file, for example, allow anonymous users and vsftd a user (ie, virtual users) to 80KB = 1024 * 80 = 81920 speed download
anon_max_rate = 81920
local_max_rate = 81920

11 user (usually refers to the virtual user) restrictions in their own directory to modify configuration files, so users can only access their home directory:
chroot_local_user = yes
If you only want certain users can only access its own directory, other users do not do this limit, then you need to chroot_list file (this file is usually in the / etc / vsftpd / in) to add this user.
Edit this file, such as the test user to this file, then write it to. In general, then a user per line.
[Root @ localhost vsftpd] # cat chroot_list
test

12. Bind an IP to vsFTPd
Sometimes you want to restrict certain IP to access the server, allowing only certain IP access, for example, only allow 192.168.0.33 to access the FTP, also modify the configuration file:
listen_address = 192.168.0.33

Configuration vsftpd.conf
anonymous_enable = NO # ban anonymous
local_enable = YES # Allow log on locally
write_enable = YES # allowed to write, for upload, you must
local_umask = 027 # set the permissions to upload files to :777-local_umask
anon_upload_enable = YES # Virtual users and allow anonymous users to upload
anon_other_write_enable = YES # Virtual users and allow anonymous users to modify file names and delete files
dirmessage_enable = YES
xferlog_enable = YES # turn on logging
connect_from_port_20 = YES
xferlog_file = / var / log / vsftpd.log # log storage location
xferlog_std_format = YES # standard log format
idle_session_timeout = 600 # idle connection timeout
data_connection_timeout = 120
ftpd_banner = Welcome to ChinaRise FTP service # welcome message
guest_enable = yes # to allow virtual users
guest_username = vsftpdguest # virtual user account to use the system
virtual_use_local_privs = YES # Virtual user with Local System privileges

chroot_local_user = NO
chroot_list_enable = YES
# These two lines in its virtual directory under the user limit, you can not access other directories, or directly
chroot_local_user = YES

listen = yes # monitor / passive mode
listen_port = 21 # listening port

chroot_list_file = / etc / vsftpd / vsftpd.chroot_list # virtual user list stored in the file / etc / vsftpd / vsftpd.chroot_list in
user_config_dir = / etc / vsftpd / vsftpd_user_conf # each virtual user name stored in the cultivation of a more detailed / etc / vsftpd / vsftpd_user_conf in

Other users set up virtual

In the / etc / vsftpd / vsftpd.chroot_list file written to allow landing of a virtual user name, one per line in / etc / vsftpd / vsftpd_user_conf folder, create a virtual user named user file,
Write: local_root = / var / FTP / subdirectory name and then in / var / FTP, create a corresponding directory to

相关文章
  • Centos installation and configuration under the vsftp (rpm) 2011-09-15

    yum install vsftpd 2 start / restart / shut down vsftpd server [Root @ localhost ftp] # / sbin / service vsftpd restart Shutting down vsftpd: [OK] Starting vsftpd for vsftpd: [OK] OK indicates that the restart was successful. Startup and shutdown wer

  • 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

  • VMware Server on CentOS installation and configuration under 2011-05-13

    Quote Under VMware Server on CentOS installation and configuration of 2011-02-28 14:27 Reprinted from xc_hai final edit produced xc_haiVMware Server is a VMware software, free to use (registration required for License), it can run on Windows platform

  • Linux installation and configuration under the VSFTP 2010-09-20

    1. Download vsftp source code address is: ftp://vsftpd.beasts.org/users/cevans/ Then extract tar-xvzf vsftpd-2.3.2.tar.gz cd vsftpd-2.3.2 make Error: Implementation of the compiler is having problems make / Lib/libpam.so.0: could not read symbols: Fi

  • CentOS in the installation and configuration of vsftp 2011-10-01

    1 install and use chkconfig - list to see if installed vsftpd service; Directly using the yum command: yum-y install vsftpd Then it creates a log file: touch / var / log / vsftpd.log Two simple commands to complete the installation of a vsftp, but if

  • Nfs see CentOS system installation and configuration 2011-03-16

    from http://os.51cto.com/art/201004/192831.htm http://os.51cto.com 2010-04-06 16:56 Anonymous I want to comment (0) Abstract: This article by explaining the system through a CentOS server-side configuration, create a shared directory, create or modif

  • 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

  • Dimdim & Moodle installation and configuration documentation excerpt 2010-11-09

    Dimdim & Moodle installation and configuration documentation excerpt March 30, 2010 ------------------------------------- This agreement follows the GPL v2, protected by the GPL v2 protocol. Welcome to reprint, but must retain the following text: Wri

  • ImageMagick image processing tools for Java installation and configuration (windows & linux) 2010-12-29

    Here I explain the sub-windows and linux down one. Windows installation and configuration of the next (using a 6.3.9) Software Download: http://downloads.jmagick.org/ Download ImageMagick-6.3.9-0-Q8-windows-dll.exe and jmagick-win-6.3.9-Q8.zip Instal

  • One more install CentOS: CentOS installation to use Sun VirtualBox 2010-05-06

    OK, now, thanks to virtual machine technology with a dual system on the provinces, so the next thing in my colleagues asked, found a small virtual machine: Sun VirtualBox, use what feels good ~ ~ good, not crap started install linux virtual machines

  • mrtg snmp monitor network traffic of simple installation and configuration documentation 2010-05-24

    mrtg snmp installation and configuration documentation 1, net-snmp installed on the monitored machine, and start the service. 2, mrtg installed on the machine to provide web services, on the scheduled tasks, the time machine to be monitored to obtain

  • fedora8 on the installation and configuration virtualBox 2010-10-08

    fedora8 on the installation and configuration virtualBox Download various versions of VirtualBox: http://download.virtualbox.org/virtualbox/ 1.download the file: Check the CPU support for a lot of bits > Getconf LONG_BIT 64 Download VirtualBox-3.0.8_

  • unbuntu ftp installation and configuration service 2010-10-15

    ubuntu ftp server installation and configuration 2007-07-20 18:33 1. Download vsftpd # Apt-get install vsftpd PS: If you are prompted ---- Tip "E: dpkg was interrupted, you must manually run 'dpkg - configure-a' to correct the problem." The solu

  • nsf Installation and Configuration 2010-10-29

    Start Service # / Etc / init.d / nfs start Stop Service # / Etc / init.d / nfs stop Restart Services # / Etc / init.d / nfs restart Edit / etc / exports / Home / share 192.168.102.15 (rw, sync, no_root_squash) * (ro) Parameter explanation: [Sharing d

  • Installation and configuration of VNC 2010-12-10

    VNC (Virtual Network Computing) is the acronym for virtual network computer. VNC is an excellent tool for remote control software, by the famous AT & T, the development of European research laboratories. VNC is based on UNIX and Linux operating syste

  • Linux, installation and configuration of MRTG 2011-01-13

    MRTG SNMP from the device to get through the use of equipment (such as switches) and network traffic information, and the PNG graphics in HTML format display it easy to monitor the network administrator on the device (switch) to manage. Can be manage

  • 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

  • VNC installation and configuration 2010-12-10

    VNC (Virtual Network Computing) is the abbreviation for virtual network computer. VNC is an excellent remote control tool, by the famous AT & T's European Research Laboratory. VNC is based on UNIX and Linux operating systems on a free open source sof

  • CentOS installation Gnome 2011-02-20

    At first installed the system, did not choose Gnome or KDE, now want to put on a play. Simple installation can refer to this: http://huruxing159.iteye.com/blog/744750 centos installation is to use linux text mode installation does not install xwindow

  • centos installation under svn 2011-06-11

    Under the svn Centos Installation: yum install subversion2. svn directory configuration set up svn repository can be built more: New folder: mkdir / opt / svndata / zanwork The establishment of the repository: svnadmin create / opt / svndata / zanwor