Set up (install) the ftp server (debian) in linux)
Source: Internet
Author: User
Set up (install) the ftp server (debian) in linux 1: install vsftpd # aptitudeinstallvsftpd2: Configure vsftpd # vim/etc/vsftpd. conf [cpp] # The server runs in standalong mode, so that the following controls can be performed: listenYES # accept...
Set up (install) the ftp server (debian) in linux 1: install vsftpd # aptitude install vsftpd 2: Configure vsftpd # vim/etc/vsftpd. conf [cpp] # The server runs in standalong mode, in this way, you can perform the following control: listen = YES # accept anonymous users anonymous_enable = YES # Do not ask the password no_anon_password = YES when anonymous users log in # accept local users local_enable = YES
# Upload allowed (global control ). if you want anonymous users to upload files, set anon_upload_enable = YES. # If you want anonymous users to create directories, set anon_mkdir_write_enable = YES. upload by anonymous users is prohibited, so do not set the two items www.2cto.com write_enable = YES # umask local_umask = 022 for local users to upload files # if set to YES, anonymous logon users are allowed to upload directories. of course, anonymous users must have the write permission to the upper-layer directory. Anon_upload_enable = YES # defines the name of the anonymous login user. The default value is ftp ftp_username = ftp # if it is set to YES, the anonymous login will be allowed to add directories. of course, anonymous users must have write permission to the upper-level Directory.
Anon_mkdir_write_enable = YES # If YES, the text files specified by the message_file option in this directory are displayed when you enter the directory # (, default. message) content dirmessage_enable = YES # directory where the local user logs are located. if this item is not set, then the local user login will be in his home directory # (the sixth field of/etc/passwd. the corresponding option for anonymous users is anon_root # local_root =/home anon_root =/home/ftp/# use upload/download logs. the default log file is/var/log/vsftpd. log, you can use the xferlog_file # option to modify www.2cto.com xferlog_enable = YES # Make sure PORT transfer connections originate from port 20 (ftp-data ). connect_from_port_20 = YES
# Use the standard xferlog format xferlog_std_format = YES # You may change the default value for timing out a data connection. data_connection_timeout = 120 # disable local user chroot () chroot_local_user = NO # Set to yes, the following control is valid. # Enable the chroot () user item. chroot_list_enable = YES # (default follows) # specify the specific user file for chroot () to be set chroot_list_file =/etc/vsftpd. chroot_list # if set to YES, the specified file is recorded in the userlist_file option (default:/etc/vsftpd. the user in user_list) # cannot log in, and the following userlist_deny option userlist_enable = YES www.2cto.com # if NO, only the specified file (/etc/vsftpd by default) is accepted. user_list) # The user's login request. if YES, requests from these users are not accepted. userlist_deny = NO # Note !!! Vsftpd also checks the/etc/vsftpd. ftpusers file. the user recorded in this file will # be unable to log in !! # Anonymous user transmission rate (B/s) anon_max_rate = 512000 # Local user transmission rate (B/s) local_max_rate = 1024000
# Acceptable maximum number of clients max_clients = 100 # maximum number of clients per ip max_per_ip = 5 # This option shocould be the name of a directory which is empty. also, the # directory shocould not be writable by the ftp user. this directory is used # as a secure chroot () jail at times vsftpd does not require filesystem access. secure_chroot_dir =/var/run/vsftpd www.2cto.com # This string is the name of the PAM service vsftpd will use. Pam_service_name = vsftpd tcp_wrappers = YES # This option specifies the location of the RSA certificate to use for SSL # encrypted connections. rsa_cert_file =/etc/ssl/certs/vsftpd. pem # each online service can be presented in an independent process. setproctitle_enable = YES # if it is started, all anonymous data Upload owners will be replaced with the users set in chown_username. This option is useful for security and management. Www.2cto.com chown_uploads = YES # Here we can define the user name that will be replaced when the anonymous login uploads the file. Pre # set the value to root. Chown_username = root 3: Add user group # groupadd ftpuser # mkdir/home/tom/# useradd-g ftpuser tom passwrd tom 4: modify permission # vim/etc/passwd the last part is the permission tom: x: 1001: 1001:/home/tom: Add/bin/bash tom: x: 1001: 1001 :: /home/tom:/bin/bash change the file owner permission # chown-v-R tom: ftpuser/home/tom/# chmod-v-R 700/home/tom/share a folder with the ftpuser group, make a connection # ln-v-s/home/ftpuser // home/tom/ftpuser to set the welcome information and create a new one in each user's folder. message www.2cto.com edit/etc/vsftpd. user_list fill in all ftp users, including anonymous edit/etc/vsftpd. chroot_list is not allowed to enter the username of the upper-level directory to grant/home/ftp/the permission to modify the directory that allows anonymous writing. If no new directory is created and saved, restart vsftpd #/etc/init. d/vsftpd restart chmod-v 777/home/ftp/temp/5. by default, vsftpd logs are stored in/var/log/vsftpd. the log ftp directory is in/home/ftp. if the error 530 www.2cto.com is reported during user logon, check the shell of/etc/passwd, change to/sbin/nologin and add the above address in/etc/shell to save it and restart vsftpd to Mount non-ftp directories, such as other paths, use mount -- bind, for example, to mount/home/music to/home/ftp/music first mkdir/home/ftp/music # mount -- bind/home/music/home/ftp/music you can.
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.