In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
CentOS Vsftpd profile service how to adjust, I believe that many inexperienced people do not know what to do, so this paper summarizes the causes of the problem and solutions, through this article I hope you can solve this problem.
Adjust the CentOS Vsftpd profile:
1. Back up the CentOS Vsftpd configuration file before editing
[root@KcentOS5 ~] cp / etc/vsftpd/vsftpd.conf / etc/vsftpd/vsftpd.conf.backup
two。 Edit the main CentOS Vsftpd profile Vsftpd.conf
[root@KcentOS5 ~] vi / etc/vsftpd/vsftpd.conf
Here I will fully record the changes to the original CentOS Vsftpd configuration file, and I will keep comments on the original configuration wherever they are modified. Including my understanding of each configuration item, for some of the more key configuration items here I have made my point of view, and I will not delete the original English instructions for reference and comparison.
Example config file / etc/vsftpd/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 idea of vsftpd's
Capabilities.
Allow anonymous FTP? (Beware-allowed by default if you comment this out)
Anonymous_enable=YES
Anonymous_enable=NO
Set not to allow anonymous access
Uncomment this to allow local users to log in.
Local_enable=YES sets local users to access. Note: mainly for virtual host users, if the project is set to NO, then all virtual users will not be able to access it.
Uncomment this to enable any form of FTP write command.
Write_enable=YES
Set to be able to write.
Default umask for local users is 077. You may wish to change this to 022
If your users expect that (022 is used by most other ftpd's)
Local_umask=022
Set the permission mask for the uploaded file.
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
Obviously need to create a directory writable by the FTP user.
Anon_upload_enable=YES
Anon_upload_enable=NO
Anonymous users are prohibited from uploading.
Uncomment this if you want the anonymous FTP user to be able to create
New directories.
Anon_mkdir_write_enable=YES
Anon_mkdir_write_enable=NO
Anonymous users are prohibited from creating directories.
Activate directory messages-messages given to remote users when they
Go into a certain directory.
Dirmessage_enable=YES
Set to enable the directory slogan function.
Activate logging of uploads/downloads.
Xferlog_enable=YES
Set to turn on logging.
Make sure PORT transfer connections originate from port 20 (ftp-data).
Connect_from_port_20=YES
Set port 20 for data connection.
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_uploads=NO
Set to prohibit the upload of files to change the host.
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 service log save path for CentOS Vsftpd configuration. Note that the file does not exist by default. You have to manually touch out, and the service host user that has changed the CentOS Vsftpd configuration here is the manually established Vsftpd. Care must be taken to give the user write permissions to the log, otherwise the service will fail to start.
If you want, you can have your log file in standard ftpd xferlog format
Xferlog_std_format=YES
Set the log to use a standard record format.
You may change the default value for timing out an idle session.
Idle_session_timeout=600
Set the idle connection timeout. The default is used here. Leave the specific value to each specific user to specify, of course, if not specified, or use the default value of 600 here, in seconds.
You may change the default value for timing out a data connection.
Data_connection_timeout=120
Set a single * * continuous transmission time. The default is used here. Leave the specific value to each specific user to specify, of course, if not specified, or use the default value of 120 here, in 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=ftpsecure
Nopriv_user=vsftpd
Set the host user of the supporting CentOS Vsftpd service to be a manually established Vsftpd user. Note that once a change is made to the host user, attention must be paid to the read and write authorization of the read and write files associated with the service. For example, the log file must give the user write permission and so on.
Enable this and the server will recognise 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
Set to support asynchronous transmission.
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
Set the upload and download functions that support ASCII mode.
You may fully customise the login banner string:
Ftpd_banner=This Vsftp server supports virtual users ^ _ ^
Set the login banner for the CentOS Vsftpd configuration.
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
Chroot_list_enable=NO
Users are not allowed to log out of their FTP home directory.
(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
Ls_recurse_enable=NO
Prohibit users from using the "ls-R" command after logging in to FTP. This command can cause significant overhead on server performance. If this item is allowed, it will be used by multiple users when using the command at the same time.
The server poses a threat.
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 directive.
Listen=YES
Set the CentOS Vsftpd service to work in StandAlone mode. By the way, the so-called StandAlone mode is that the service has its own daemon support, and we will be able to see the daemon name of vsftpd under the ps-A command. If you do not want to work in StandAlone mode, you can choose SuperDaemon mode, in which vsftpd will not have its own daemon, but will be fully represented by the super daemon Xinetd, at the same time, many functions of Vsftp services will not be implemented.
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=YES
Pam_service_name=vsftpd
Set the CentOS Vsftpd configuration verification file name under the PAM service. Therefore, PAM verification will refer to the vsftpd file configuration under / etc/pam.d/.
Userlist_enable=YES
Set that users in userlist_file will not be allowed to use FTP.
Tcp_wrappers=YES
Set to support TCP Wrappers.
KC: The following entries are added for supporting virtual ftp users.
The following are important CentOS Vsftpd configuration items supported by Vsftpd virtual users. These settings are not included in the default Vsftpd.conf, so you need to add your own configuration manually.
Guest_enable=YES
Set to enable the virtual user feature.
Guest_username=overlord
Specifies the host user for the virtual user.
Virtual_use_local_privs=YES
Set the permissions of virtual users in line with their host users.
User_config_dir=/etc/vsftpd/vconf
Set the configuration file storage path of the virtual user's personal Vsftp. In other words, this specified directory will store the profile of each Vsftp virtual user's personality, a
The place is that these profile names must be the same as the virtual user name. Save exit.
3. Establish a log file for the CentOS Vsftpd configuration, and change the owner to the service host user of Vsftpd:
[root@KcentOS5 ~] touch / var/log/vsftpd.log
[root@KcentOS5 ~] chown vsftpd.vsftpd / var/log/vsftpd.log
4. Establish the virtual user CentOS Vsftpd profile storage path:
[root@KcentOS5 ~] mkdir / etc/vsftpd/vconf/
After reading the above, have you mastered how to adjust the CentOS Vsftpd profile service? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.