In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/01 Report--
This article will explain in detail how to use Pureftpd+PureDB to build a simple Linux ftp website. The content of the article is of high quality, so the editor will share it with you for reference. I hope you will have a certain understanding of the relevant knowledge after reading this article.
Pureftpd is a fast, high-quality, fully functional ftp server, the most important thing is to support the setting of client default coding, today I will give you a detailed introduction: how to use Pureftpd+PureDB to build a Linux ftp website.
Objective:
Build a ftp site with multiple virtual users that can be accessed anonymously or authenticated. Anonymous users can only download and upload. Verify that users can download or upload.
The virtual user is accessed using the ftpuser account of the ftpgroup group.
The admin2 account does not belong to the ftpgroup group, but to the administrators group admin2.
Directory structure:
1the data file of var/ftpd/*, pureftpd is stored in the directory: / var/ftpd/*, owner admin2, group admin2.
/ var/ftpd/source/public [stores public materials, which can be accessed by anonymous anonymous. Permission: 777].
/ var/ftpd/source [stores the information exchanged within the partner user group, which can be accessed by the partner user vuser. Permission: 777.]
/ var/ftpd/home [stores the information of administrators and other senior personnel, which can be accessed by administrative users admin2. Permission: 755.]
2 the location of the executable file of usr/local/pureftpd/*, pureftpd: / usr/local/pureftpd/*, owner: root, group root.
/ usr/local/pureftpd/etc/ contains "parameters and configuration folders": bin,man,sbin folders automatically generated by etc;pureftpd, etc.
/ usr/local/pureftpd/etc/ has files: ftpmsg (self-created), pureftpd.log (self-created), pure-ftpd.conf (copied from compilation), pureftpd.pdb (program automatic generation), pureftpd.passwd (program automatic generation).
User assignment
Virtual users: including anonymous, vuser, admin2.
Anonymous user: anonymous
Accessible resources: / var/ftpd/source/public/* [access to all materials under the public directory public/*]
Upload: not allowed
Download rate: limited
Partner user: vuser
Accessible resources: / var/ftpd/source/* [can access all the data of users in the group, create and delete subdirectories, create and overwrite files: source/*, including / source/public/*]
Upload: allow
Upload space: limited
Rate: limited
Administrative user: admin2
Accessible resources: / var/ftpd/* [all ftp materials can be accessed, subdirectories can be created and deleted, files can be created and overwritten: including home/*,source/*,/source/public/*]
Upload: allow
Upload space: limited
Rate: unlimited
Execute:
Establish the data file directory, set the owner, permissions:
Code:
# su # mkdir / var/ftpd # mkdir / var/ftpd/home # mkdir / var/ftpd/source # mkdir / var/ftpd/source/public # groupadd admin2 # useradd admin2-g admin2-d/home / admin2-s / bin/bash # passwd admin2 # cd / var # chown-R admin2 ftpd # chgrp-R admin2 ftpd # chmod-R 755 ftpd # cd / var/ftpd # chmod-R 777 source
Create an executable directory for pureftpd:
Code:
# cd / usr # mkdir / usr/local/pureftpd # mkdir / usr/local/pureftpd/etc # mkdir / usr/local/pureftpd/temp # # the temporary directory used by the installer, which can be deleted after use
Install pureftpd
Download: http://www.pureftpd.org
Copy, decompress
Code
# cp pure-ftpd-1.0.21.tar.gz / usr/local/pureftpd/temp # cd / usr/local/pureftpd/temp # tar xzvf pure-ftpd-1.0.21.tar.gz # cd pure-ftpd-1.0.21
Compile
Code:
. / configure-- prefix=/usr/local/pureftpd-- with-everything-- with-rfc2640
# Note:
-- prefix is the target directory for installation
-- with-eyerything is to install all features
-- with-rfc2640, the language set conversion of heterogeneous systems such as UTF-8,gb2312
In addition, if you need to connect with mysql, modify the prompt language and so on, you also need to specify here, for example:
-- with-mysql=/opt/mysql
-- with-language=simplified-chinese
This article does not deal with.
Installation
Code:
# make # make check # make install
2.3 configure pureftpd
Copy the configuration file to the specified directory
Code:
# chmod 755 configuration-file/pure-config.pl # cp configuration-file/pure-config.pl / usr/local/pureftpd/sbin/ # cp configuration-file/pure-ftpd.conf / usr/local/pureftpd/etc/ # cd / usr/local/pureftpd/etc/ # gedit pure-ftpd.conf
Pure-ftpd.conf full text Notes (attached):
Virtual user public account setting
Code:
# groupadd ftpgroup # useradd ftpuser-g ftpgroup-d / dev/null-s / etc
Or:
# mkdir / home/null # chmod 777 / home/null # useradd ftpuser-g ftpgroup-d / home/null-s / etc
Add ftp users to anonymously support:
# useradd ftp-g ftpgroup # add a user "ftp" must be this name, it and other ftp users are subordinate to the above ftpgroup.
(if the ftp user already exists, modify the default group of ftp: # usermod-g ftpgroup ftp)
# usermod-d / var/ftpd/source/public ftp # change the home directory of the user "ftp". # chown ftp.ftpgroup / var/ftpd/source/public
Virtual user account setting
Code:
# cd / usr/local/pureftpd/bin #. / pure-pw useradd vuser-u ftpuser-d / var/ftpd/source #. / pure-pw useradd admin2-u admin2-d / var/ftpd
# # Note: vuser is the user name,-u ftpuser is its actual linux user, and-d specifies the starting directory and is locked in this directory. If it is not locked, use-D
# # if you need to limit the addition of the IP segment:-r 192.168.0.
Establish a user database
Code:
#. / pure-pw mkdb / usr/local/pureftpd/etc/pureftpd.pdb
# Note: mkdb should be executed once every time a user database is added or modified in the future, and there is no need to restart ftp after execution
Start pureftpd
Code:
# / usr/local/pureftpd/sbin/pure-config.pl / usr/local/pureftpd/etc/pure-ftpd.conf
Or set the execution file pureftpd.sh to serve the system:
# vi pureftpd.sh
Content:
#! / bin/sh echo "" / usr/local/pureftpd/sbin/pure-config.pl / usr/local/pureftpd/etc/pure-ftpd.conf
Then:
# chmod 755 pureftpd.sh
The following command will take effect immediately, #. / pureftpd.sh
Restart the system and test the installation effect.
On how to use Pureftpd+PureDB to build a simple Linux ftp website to share here, I hope the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
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.