In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
Editor to share with you what pure-ftpd is like in Ubuntu, I believe most people do not know much about it, so share this article for your reference, I hope you can learn a lot after reading this article, let's go to know it!
Pureftpd is a fast, high-quality, fully functional ftp server, the most important thing is to support the setting of client default coding, Ubuntu Server 10.04 under the pure-ftpd configuration process is as follows.
What does pure-ftpd look like in Ubuntu
Ubuntu/Debian provides three different deb installation packages for Pure-FTPd, namely pure-ftpd, pure-ftpd-ldap, and pure-ftpd- mysql, where ldap and mysql represent the integration of Pure-FTPd with ldap and mysql, respectively, and all three packages rely on pure-ftpd-common. If we don't need ldap and mysql, we can just choose pure-ftpd.
Configuration mode
Unlike most other daemons (daemon), the configuration of Pure-FTPd is special: it does not read any configuration files, and configuration options are implemented through command-line arguments. For example, the parameter'- H' is designed to speed up the server by avoiding DNS queries. To enable this feature, we just need to add it to the command line: pure-ftpd-H. Alternative long arguments are also supported. Here is an equivalent command pure-ftpd-- dontresolve
For users who like configuration files, Pure-FTPd has officially come up with a solution: parse the configuration file and convert it into command-line arguments through a wrapper tool. First edit the configuration file pure-ftpd.conf according to your needs, and then start pure-config.pl / etc/pure-ftpd.conf with the following command. Pure-config.pl is a perl script that invokes pure-ftpd with the appropriate command-line options based on the configuration file.
In Ubuntu/Debian, developers use another wrapper approach: instead of using a single configuration file, it sets up a pure-ftpd directory under / etc, with conf, auth, db, and a file called pureftpd-alias-dir. Each configuration option exists in the / etc/pure-ftpd/conf directory as a file, with the option as the file name and the option value as the file content. For example, if you want to configure AnonymousOnly=yes (only anonymous users are allowed), create a file called AnonymousOnly in / etc/pure-ftpd/conf with only one line: yes.
In Ubuntu, we only focus on * one configuration method.
Environment:
1, install pure-ftpd on a Ubuntu server 10.4 server and configure it as a FTP server
2, login test with FileZilla Client on the client
Action:
1, install pure-ftpd
# sudo apt-get install pure-ftpd
# sudo netstat-nl
Check to see if port 21 is open.
2. If you log in with a local account in FileZilla Client, the following error will occur
Solution: you can solve the problem by creating a DontResolve file with the content of yes under / etc/pure-ftpd/conf. At this point, the local account can use the FTP service.
3. Use virtual account to manage users.
(1) manually create a home directory
# sudo mkdir / var/ftp # sudo mkdir / var/ftp/js
(2) create groups and users
# sudo groupadd ftpadmins # sudo groupadd ftpusers # sudo useradd-g ftpadmins-d / dev/null-s / bin/false ftpadmin # sudo useradd-g ftpusers-d / dev/null-s / bin/false js
(3) change the corresponding access permissions
# sudo chown-R ftpadmin / var/ftp/ # sudo chmod-R 775 / var/ftp/js
*: to prevent one user in the same group from deleting another user's file, make the following settings
Creating a KeepAllFiles file under / etc/pure-ftpd/conf as yes # forbids users to delete files, except those in the TrustedGID group
Create a TrustedGID file under / etc/pure-ftpd/conf that contains a GID of 2002 # administrators group ftpadmins, allowing administrators to delete files, where 2002 is the GID of ftpadmins
(4) add virtual users
# sudo pure-pw useradd admin-u ftpadmin-d / var/ftp # sudo pure-pw useradd js001-u js-d / var/ftp/js
At this time, pureftpd.passwd and pureftpd.pdb files will be added under / etc/pure-ftpd/.
# sudo pure-pw list # sudo pure-pw show js001
Use the above two commands to view the corresponding user information, and more pure-pw usage can be viewed by man pure-pw
(5) make virtual users effective.
# sudo pure-pw mkdb
(6) using pureDB authentication method, the virtual user cannot log in without the following steps, and a 530th error message will appear.
# cd / etc/pure-ftpd/auth # sudo ln-s.. / conf/PureDB 60puredb
(7) restart pure-ftpd service
# sudo / etc/init.d/pure-ftpd restart
Summary: the pure-ftpd configuration is complete and a simple FTP is set up.
However, the permission problem arises. There is no strict permission setting in the configuration of pure-ftpd. The related ones are:
1. If your pure-ftpd compiles with pure-uploadscript support, this directive will make pure-ftpd
Send information about the new upload to / var/run/pure-ftpd.upload.pipe, so that pure-uploadscript
You can read it and call a script to process the new upload.
If the content of CallUploadScript is yes under / etc/pure-ftpd/conf, pure-ftpd.upload.pipe,pure-ftpd.upload.lock will be generated under / var/run.
I haven't tried this method yet.
2KeepAllFilesdeleting yes # forbids users to delete files, except those in the TrustedGID group
TrustedGID=1001 # GID of the administrators group ftpadmins, which allows administrators to delete files
ChrootEveryone=yes # restricts all users to their homedir
3, map virtual users to different local users, so that permissions can be controlled. The disadvantage is to create different local groups and users.
The above is all the content of the article "what is pure-ftpd like in Ubuntu?" Thank you for reading! I believe we all have a certain understanding, hope to share the content to help you, if you want to learn more knowledge, welcome to follow the industry information channel!
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.