Linux FTP configuration details

Source: Internet
Author: User

Linux FTP configuration details 1. vsftpd Description: There are a lot of FTP service software under www.2cto.com LINUX, the most common include vsftpd, Wu-ftpd and Proftp. in Red Hat Enterprise Linux, vsftpd is installed by default. access to the FTP server must be verified. Users can access and transmit files only after the FTP server has been verified. vsftpd provides three ftp logon modes: (1) the use of anonymous (anonymous accounts) is a widely used FTP server. if you do not have an account on the FTP server, you can use anonymous as the username and your email address as the password to log on. after an anonymous user logs on to the FTP server, the logon directory is/var/FTP. to reduce the load on the FTP server, the upload function of an anonymous account should be disabled. (2) real (real Account) real, also known as a local account, is a real user The user can log on to the FTP server with the same name and password, provided that the user has his/her own account on the FTP server. after you log on with a real account, the user's directory is used to log on to the system. This directory is automatically created when the system creates an account. (3) guest (virtual account) if the user has an account on the FTP server, but this account can only be used for the file transfer service, then this account is guest, guest is a form of real accounts. The difference is that geust cannot access contents other than the home directory after logging on to the FTP server. II. the FTP-related configuration files contain/etc/vsftpd. conf,/etc/vsftpd. ftpusers,/etc/vsftpd. user_list: When configuring the FTP server, it mainly modifies related statements in these files. 1. vsftpd. conf file description # Example config file/etc/vsftpd. conf # The default compile D in settings are fairly paranoid. this sample file # loosens things up a bit, to make the ftp daemon more usable. # Please see vsftpd. conf.5 for all compiled in defaults. # read this: This example file is NOT an exhaustive list of vsftpd options. # Please read the vsftpd. conf.5 manual page to get a full idea of vsftpd's # capabilities. # Allow anonymous FTP? (Beware-allowed by default if you comment this out ). anonymous_enable = YES // whether to allow anonymous to log on to the FTP server. The default value is YES. # Uncomment this to allow local users to log in. local_enable = YES // whether to allow local users to log on to the FTP server. The default value is # Uncomment this to enable any form of FTP write command. write_enable = YES // whether to allow users to execute write operations in FTP server files. The Default value is allow # Default umask for local users is 077. you may wish to change this to 022, # if your u Sers reset CT that (022 is used by most other ftpd's) local_umask = 022 // set the local user's file generation mask to 022, the default value is 077 # Uncomment this to allow the anonymous FTP user to upload files. this only # has an effect if the above global write enable is activated. also, you will # obviusly 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 // whether anonymous accounts are allowed to create directories on the FTP server # Activate directory messages-messages given to remote users when they # go into a certain directory. dirmessage_enable = YES // activates the directory information. When a remote user changes the directory, a prompt is displayed. # Activate logging of uploads/downloads. xferlog_enable = YES // enable the log upload and download function # Make sure PORT transfer connections originate from port 20 (ftp-data ). connect _ From_port_20 = YES // Connection Request for enabling the FTP data port # If you want, you can arrange for uploaded anonymous files to be owned by # a different user. Note! Using "root" for uploaded files is not # recommended! # Chown_uploads = YES # chown_username = whoever # You may override where the log file goes if you like. the default is shown # below. # xferlog_file =/var/log/vsftpd. log // set the log file name and storage path. This is the default # If you want, you can have your log file in standard ftpd xferlog format xferlog_std_format = YES // whether the standard ftpd xferlog log file format is used # You may change the default value for timing out an idle session. # idle_session_timeout = 600 // set the idle user session interruption time. the default value is 10 minutes. # You may change the default value for timing out a data connection. # data_connection_timeout = 120 // set the data connection timeout. The default value is 120 seconds. # It is recommended that you define on your system a unique user which the # ftp server can use as a totally isolated and unprivileged user. # nopriv_user = ft1_cure # Enable this and the server will recognize asynchronous ABOR requests. not # recommended for security (the code is non-trivial ). not enabling it, # however, may confuse older FTP clients. # async_abor_enable = YES # By default the server will pretend to allow ASCII mode but in fact ignore # the request. turn on the below options to have the server actually do ASCII # mangling on files when in ASCII mode. # Beware that turning on ascii_download_enable enables malicious remote parties # to consume your I/O resources, by issuing the command "SIZE/big/file" in # ASCII mode. # These ASCII options are split into upload and download because you may wish # to enable ASCII uploads (to prevent uploaded scripts etc. from breaking), # without the DoS risk of SIZE and ASCII downloads. ASCII mangling shocould be # on the client anyway .. # ascii_upload_enable = YES # ascii_download_enable = YES // whether files can be uploaded and downloaded in ASCII format # You may fully customise the login banner string: # ftpd_banner = Welcome to bLH FTP service. // set the welcome logon information on the FTP server. # You may specify a file of disallowed anonymous e-mail addresses. apparently # useful for combatting certain DoS attacks. # deny_email_enable = YES # (default follows) # banned_email_file =/etc/vsftpd. banned_emails # You may specify an explicit list of local users to chroot () to their home # directory. if chroot_local_user is YES, then this list becomes a list of # users to NOT chroot (). # chroot_list_enable = YES // if you want to log on to a directory other than your own directory, you need to set this item. If you set chroot_list_enable = YES, only/etc/vsftpd is allowed. users listed in chroot_list have this function. if you want all local users to execute chroot, you can add a row: chroot_local_user = YES # (default follows) # chroot_list_file =/etc/vsftpd. chroot_list # You may activate the "-R" option to the builtin ls. this is disabled by # default to avoid remote users being able to cause excessive I/O on large # sites. however, some broken FTP clients such as "ncftp" and "mirror" assume # the presence of the "-R" option, so there is a strong case for enabling it. # ls_recurse_enable = YES pam_service_name = vsftpd // set the configuration file name of the PAM Authentication Service, which is stored in/etc/pam. d/directory. userlist_enable = YES // whether the user in the user list can log on to the FTP server, the default value is not allowed # enable for standalone mode listen = YES // make vsftpd in independent Startup mode tcp_wrappers = YES // use tcp_wrqppers as the host Access Control mode 2. vsftpd. the ftpusers file indicates that this file is used to record "Not Allowed" users logging on to the FTP server, usually some default users. the following is the default list of logins not allowed in this file: # Users that are not allowed to login via ftp root // by default, root and its users are not allowed to log on to the FTP server. users not allowed to log on can be added here. however, each user must occupy a single row. bin daemon adm lp sync shutdown halt mail news uucp operator games nobody 3. vsftpd. the user_list file indicates that its content is the same as that in the above file, but the system only implements vsftpd on the file. during the conf check, "userlist_deny = YES" is detected. Therefore, this file must exist. the following is the content of this file. # vsftpd userlist # If userlist_deny = NO, only allow users in this file # If userlist_deny = YES (default), never allow users in this file, and # do not even prompt for a password. # Note that the default vsftpd pam config also checks/etc/vsftpd. ftpusers # for users that are denied. root bin daemon adm lp sync shutdown halt mail news uucp operator games nobody

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.