Linux under PUREFTPD Configuration installation (full version)

Source: Internet
Author: User

Online about pureftp a lot of installation tutorials, but after trying to find a lot of actually imperfect, very easy to make mistakes, the installation of their own after the summary of the following:

Before the installation, it is best to use NETSTAT-NTL to see whether the FTP default 21 port has been occupied, but also can use the PS-EF instructions to see what services opened, see if there is a similar sftp or vsftp services, if opened, with Killall SFTP command to kill this service.

1. Download pureftp, I downloaded is pure-ftpd-1.0.30

directive: wget http://download.pureftpd.org/pub/pure-ftpd/releases/pure-ftpd-1.0.30.tar.bz2

2. Decompression: TAR-XVJF pure-ftpd-1.0.30.tar.bz2

Enter into the unpacked directory: CD pure-ftpd-1.0.30

3. Compile method, recommend to use all installation:./configure–prefix=/usr/local/pure-ftpd/–with-

Language=simplified-chinese–with-everything

4. Installation: Make && make check && make install

5. Set up the appropriate installation directory: MKDIR/USR/LOCAL/PURE-FTPD/ETC

6. Copy the configuration file and the main execution file to the corresponding folder:

CP configuration-file/pure-ftpd.conf/usr/local/pure-ftpd/etc/
CP configuration-file/pure-config.pl/usr/local/pure-ftpd/sbin/
chmod 755/usr/local/pure-ftpd/sbin/pure-config.pl


7. Customize the system environment variables:

cd/usr/local/bin/
Ln-s/usr/local/pure-ftpd/bin/*.
Ln-s/usr/local/pure-ftpd/sbin/*/usr/local/sbin/
Ln-s/usr/local/pure-ftpd/man/man8/*/usr/local/share/man/man8/

8. Start PUREFTP Server:

Pure-config.pl/usr/local/pure-ftpd/etc/pure-ftpd.conf

The following information is generally displayed on the screen:

Running:/usr/local/pure-ftpd/sbin/pure-ftpd-a-b-b-c20-d-e-fnone-h-i15-l2000:8-m-m4-p45000:50000-q1:10-s-T 200-u133:022-u100-r-oclf:/var/log/pureftpd.log-k99-z

At this point, you can use Telnet IP address 21 under the Command Line window to detect if this port is a

9.pureftp generally need not to use the default root user to operate, will typically create a separate user name and group, with the virtual user login

Create Group: Groupadd Ftpgroup
Create User: Useradd-g ftpgroup-d/dev/null-s/etc ftpuser
Once created, you can use CAT/ETC/PASSWD and cat/etc/group to see if groups and users have been created.

10. Add FTP Virtual User

URE-PW useradd test-u ftpuser-d/home/ftpusers/test
If you want to delete after the addition is complete you can use PURE-PW Userdel test this instruction
To change the password, you can use PURE-PW passwd test this instruction

11. View user Information

PURE-PW Show Test

12. Generate Database Files

PURE-PW MKDB

13. Be sure to change the configuration file, because the default installation location for many profile databases is not the actual location, which can result in each log

When the land can not find the password, FTP has been shown passwd required, so the installation will be sure to modify the configuration file, especially the pink

Parts, pay attention to modify

Open configuration file: vi/usr/local/pure-ftpd/etc/pure-ftpd.conf

Chrooteveryone Yes # enable Chroot
Brokenclientscompatibility Yes # compatible with different clients
Daemonize Yes # background run
Maxclientsperip 20 # Maximum number of connections per IP
Verboselog Yes # record log
Displaydotfiles No # show hidden files
AnonymousOnly No # Only allow anonymous users to access
noanonymous Yes # do not allow anonymous users to connect
Syslogfacility None # do not display logs in the Syslog log
Dontresolve Yes # do not perform client DNS resolution
MaxIdleTime 15 # Maximum idle time
Limitrecursion 2000 8 # Browsing restrictions, File 2000, directory 8 layers
Anonymouscancreatedirs No # Anonymous users can create directories
Maxload 4 # No download after load exceeded
PassivePortRange 45000 50000 # Passive mode port range
#AnonymousRatio 1 10 # Anonymous user upload/download rate
Userratio 1 10 # All users upload/download ratio
Antiwarez Yes # prohibit downloading anonymous user uploaded but unauthenticated files
#AnonymousBandwidth 200 # Anonymous user bandwidth limit (KB)
Userbandwidth 8 # Maximum bandwidth for all users (KB)
Umask 133:022 # Create a file/directory default mask
Minuid 100 # Maximum UID limit
ALLOWUSERFXP No # Only run user for FXP transmission
ALLOWANONYMOUSFXP No # Allow anonymous FXP transmission for anonymous and non-anonymous users
Prohibitdotfileswrite No # Cannot delete/write hidden files
Prohibitdotfilesread No # Disable reading of hidden files
Autorename Yes # automatically renames files with the same name
Anonymouscantupload Yes # do not allow anonymous users to upload files
Altlog clf:/var/log/pureftpd.log # CLF format log file location
PUREDB/USR/LOCAL/PURE-FTPD/ETC/PUREFTPD.PDB # User database files
Maxdiskusage 99 # Prohibit uploading when disk usage hits 99%
Createhomedir Yes # automatically created if the virtual user's directory does not exist
Customerproof Yes # Prevent command errors from operating

Puredb/usr/local/pure-ftpd/etc/pureftpd.pdb This place must remember to revise, otherwise will always

No, you can do it again after the change is complete.

14. Rebuild the database file PURE-PW mkdb
15. First kill the previous pureftp service Killall pure-ftpd
16. Then restart/usr/local/pure-ftpd/sbin/ Pure-config.pl/usr/local/pure-ftpd/etc/pure-ftpd.conf
17. At this point, you can usually successfully log on, but you may still not be able to upload to the server, at this time is generally a permission issue,
Log in to the FTP home directory cd/home/ftpusers/test
Modify the file permissions under the Test folder Chown Ftpuser:ftpgroup wenjian1
and then try to reconnect later.

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: info-contact@alibabacloud.com 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.