Background: install an FTP server and store some files and videos.
When the rpm package is installed with VSFTP, the directory to be uploaded to the user is in the/root directory. In this way, if there are too many FTP files, it will occupy too many hard disk resources. Therefore, you need to add a new hard disk to store FTP files.
Requirements:
1. Anonymous Users can only download files in/mnt/ftp/public.
2. The local user logs on to the ftp directory/mnt/ftp/home/, which can be uploaded and downloaded.
3. Restrict the disk quota of users. each user has a space of 5 MB.
4. the download speed of local users is 1 m/s, while that of anonymous users is 100 k/s.
5. Max connections 3, Max connections per user 2
6. download speed of the local user user1: 10 m/s; download speed of user2: 100 k/s
7. Do not allow user1 to switch directories.
1. Add a hard disk;
Name: RedHat el52 size: 8 GB partition:/mnt/ftp
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432049-0.png "title =" 1.png" alt = "122211688.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435134-1.png "title =" 2.png" alt = "122255611.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543M05-2.png "title =" 3.png" alt = "122342676.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543A20-3.png "title =" 4.png" alt = "122420685.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431106-4.png "title =" 5.png" alt = "122458338.png"/>
Ii. New Hard Disk Partition
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431b6-5.png "title =" 6.png" alt = "122649532.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435Y3-6.png "title =" 7.png" alt = "122654768.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432452-7.png "title =" 8.png" alt = "1226592.16.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432219-8.png "title =" 9.png" alt = "122711822.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431644-9.png "title =" 10.png" alt = "122716998.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543DZ-10.png "title =" 11.png" alt = "122722233.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434X6-11.png "title =" 12.png" alt = "122733360.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432c9-12.png "title =" 13.png" alt = "123322478.png"/>
Iii. Disk Quota
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431I2-13.png "title =" 14.png" alt = "123424252.png"/>
Because a local user will log on to the Home Directory of the user when logging on to ftp. Therefore, when creating a user, make the user's home directory in the/mnt/ftp/home file. By default, the user's home directory is created in/home/user name.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543K00-14.png "style =" float: none; "title =" 15.png" alt = "123720653.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555436308-15.png "style =" float: none; "title =" 16.png" alt = "123724812.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543A03-16.png "style =" float: none; "title =" 17.png" alt = "123756375.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434056-17.png "style =" float: none; "title =" 18.png" alt = "123165242.png"/>
4. Install the vsftpd service.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434L6-18.png "style =" float: none; "title =" 19.png" alt = "123948318.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434a7-19.png "style =" float: none; "title =" 20.png" alt = "123953677.png"/>
User Logon directory test:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435918-20.png "style =" float: none; "title =" 21.png" alt = "124521481.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543M51-21.png "style =" float: none; "title =" 22.png" alt = "124529670.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543I27-22.png "style =" float: none; "title =" 23.png" alt = "124549836.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432Q5-23.png "style =" float: none; "title =" 24.png" alt = "124648261.png"/>
Disk Quota test:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434023-24.png "style =" float: none; "title =" 25.png" alt = "124840911.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555432N4-25.png "style =" float: none; "title =" 26.png" alt = "124945224.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435210-26.png "style =" float: none; "title =" 27.png" alt = "125020997.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431146-27.png "style =" float: none; "title =" 28.png" alt = "125026311.png"/>
Download speed limit and test:
Modify vsftpd configuration file/etc/vsftpd. conf
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435T5-28.png "style =" float: none; "title =" 29.png" alt = "125247617.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05554319E-29.png "style =" float: none; "title =" 30.png" alt = "125305600.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555431344-30.png "style =" float: none; "title =" 31.png" alt = "125329132.png"/>
Maximum number of connections and the number of connections per user:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05554334E-31.png "title =" 32.png" alt = "125524917.png"/>
Note: After modifying the configuration file, restart the service and reload the configuration file.
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/055543B14-32.png "style =" float: none; "title =" 33.png" alt = "182319964.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05554355N-33.png "style =" float: none; "title =" 34.png" alt = "182322253.png"/>
Restrict local users:
User1 download speed: 10 m/s, user2 download speed: 100 k/s
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05554351M-34.png "style =" float: none; "title =" 35.png" alt = "185903219.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555434B2-35.png "style =" float: none; "title =" 36.png" alt = "185931471.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555433601-36.png "style =" float: none; "title =" 37.png" alt = "190003358.png"/>
Restrict users from switching directories:
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555433625-37.png "style =" float: none; "title =" 38.png" alt = "1091302.16.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/0555435529-38.png "style =" float: none; "title =" 39.png" alt = "2017154917.png"/>
650) this. width = 650; "src =" http://www.bkjia.com/uploads/allimg/131228/05554363O-39.png "style =" float: none; "title =" 40.png" alt = "2017209355.png"/>
This article is from the blog "life is on duty, don't seek anything". I will not repost it!