Redhatvsftp configuration and automatic service startup settings

Source: Internet
Author: User
Redhatvsftp configuration and automatic service startup settings we use vsftpd here, basic configuration [root @ ftp ~] # Cat/etc/vsftpd. conf # Exampleconfigfile/etc/vsftpd. conf # Thedefaultco...
Redhat vsftp configuration and automatic service startup settings we use vsftpd here, basic configuration [root @ ftp ~] # Cat/etc/vsftpd. conf # Example config file/etc/vsftpd. conf # The default compiled 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 I Dea of vsftpd's # capabilities. # Allow anonymous FTP? (Beware-allowed by default if you comment this out ). anonymous_enable = NO # Uncomment this to allow local users to log in. local_enable = YES # Uncomment this to enable any form of FTP write command. write_enable = YES # Default umask for local users is 077. you may wish to change this to 022, # if your users except CT that (022 is used by most other ftpd's) local_umask = 022 # Uncomment this to allow the anon Ymous 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 # Activate directory messages-messages given to remote users when they # go Into a certain directory. dirmessage_enable = YES # Activate logging of uploads/downloads. xferlog_enable = YES # Make sure PORT transfer connections originate from port 20 (ftp-data ). connect_from_port_20 = YES # 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 # If you want, you can have your log file in standard ftpd xferlog formatxferlog_std_format = YES # You may change the default value for timing out an idle session. # idle_session_timeout = 600 # You may change the default value for timing out a d Ata connection. # data_connection_timeout = 120 # 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_a Bor_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 on some FTP servers, ASCII support allows a denial of service # attack (DoS) via the command "SIZE/big/file" in ASCII mode. vsftpd # predicted this attack and has always been safe, Reporting the size of the # raw file. # ASCII mangling is a horrible feature of the protocol. # ascii_upload_enable = YES # ascii_download_enable = YES # You may fully customise the login banner string: # ftpd_banner = Welcome to blah FTP service. # You may specify a file of disallowed anonymous e-mail addresses. apparently # useful for combatting certain DoS attacks. # deny_email_enable = YES # (default follows) # ban Ned_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 # (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 use Rs 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 # When "listen" directive is enabled, vsftpd runs in standalone mode and # listens on IPv4 sockets. this directive cannot be used in conjunction # with the listen_ipv6 direve VE. Listen = YES # This directive enables listening on IPv6 sockets. to listen on IPv4 and IPv6 # sockets, you must run two copies of vsftpd whith two configuration files. # Make sure, that one of the listen options is commented !! # Listen_ipv6 = YESchroot_local_user = enabled = YES start the ftp service vsftpd restartps-ef | grep vsftpd # check whether the ftp service is self-started chkconfig -- list vsftpd displays the following information: 0: off 1: off 2: off 3: off 4: off 5: off 6: off # run the following command chkconfig -- level 3 vsftpd onchkconfig -- level 5 vsftpd on # check whether the ftp service is a self-starting chkconfig -- list vsftpd. the displayed information is as follows: vsftpd 0: off 1: off 2: off 3: on 4: off 5: On 6: off note that the states 3 and 5 are true if they are on. I haven't done it for a long time. I read it online and summarize it.
Http:// OS /201210/161239.html

Root @ localhost ~] # Chkconfig -- list displays the services that can be automatically started upon startup [root @ localhost ~] # Chkconfig -- add *** add auto start upon startup *** Service [root @ localhost ~] # Chkconfig -- del *** delete automatic startup upon startup *** Service [root @ localhost ~] # Setup can be configured in the shell graphics terminal by selecting [root @ localhost ~] from the service # Ntsysv on the shell terminal graphical configuration boot start Service Command, the option is not the above multiple setup, rc. you can set the first option for both local and chkconfig. input # setup command to enter the system service menu, select the service you want to start, such as httpd, and restart the machine or/etc/rc. d. /init. d/httpd start 2) place the startup command in/etc/rc. d/rc. in the local file, the service can be automatically started every time it is started. for example, for apache, after compiling apache, the apachectl file will be generated under the bin in the installation directory. this is a startup script, we only need to add this command to rc. local (suse does not have rc. local. SUSE can define its own script in this way. if you want to run your script before and after switching the running level, you can create:/etc/init separately. d/before. local/etc/init. d/after. local) echo/usr/local/apache/bin/apachectl>/etc/rc. d/rc. local, set the automatic startup mode of the service in rc. you can also add scripts similar to the following in local: # sshd/usr/local/sbin/sshd # proftpd/usr/local/sbin/proftpd # apache/home/apache/bin/apachectl start # mysql/home/mysql/bin /safe_mysqld -- port = 3306 & # start oracle8i listener firstsu-oracle-c 'lsnrctl start' # start oracle8isu-oracle-c 'dbstart' 3) run the chkconfig command. use the chkconfig command to add a service to various running levels of the system. The procedure is as follows: 1. create a startup script. for software such as apache, mysql, and ssh, we only need to slightly modify it to support chkconfig. 2. modify the script. we need to add two lines before the script, to support the chkconfig command # chkconfig: 2345 08 92 # description: Automates a packet filtering firewall withipchains. # chkconfig, (92) descriptions: description of the service to be changed (ipchains packet filtering in the previous example ), you can execute the cp script/etc/rc after the modification you want. d/init. d/script name chmod 700/etc/rc. d/init. d/script name chkconfig -- add script name for example: to add it to the Linux startup process, only run [root @ Tester init. d]/sbin/chkconfig -- add apache-httpd [root @ Tester init. d]/sbin/chkconfig -- level 35 after apache-httpdon, our service will be automatically started and shut down every time we restart the server.
Related Article

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: 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.