Proftpd permission setting principle (1)

Source: Internet
Author: User

ProFTPDIt is the most popular FTP server software After Wu-FTP. All permissions of Proftpd must be set to run stably. This article will introduce the principle of Proftpd!

I. Test Platform

Debian 4.0r3

Proftpd 1.3.1 (with ssl)

Ii. Principles

1. Inheritance

The subdirectory inherits the attributes of its parent directory.

2. Priority

The priority ranges from large to small:

Original FTP command (list dele, etc.)> Command Group (dirs read write)> ALL Command Group

3. Application sequence of access control

Regardless of the order, the application is Deny first, and then the application is allowed (Allow)

4. System Permissions

Linux permissions still work. If the directory test Write is allowed, but this user has only

Read Permission. This means that the user cannot write data to the test directory.

----------------- Inheritance 1

------------------------- Priority 2

AllowUser u1 ------------------ authorization 3. Application sequence of access control

DenyAll

One explanation: According to reference 1, the sequence of access control should be related to the sequence of access control, but in my test, the sequence of access control has no effect. That is to say, like the above access control, AllowUser u1 and DenyAll are both in front of each other.

Iii. Instances

1. Introduction

Assume that the proftpd server has five users:

Manager, manA1, manA2, manB1, manB2

And two groups:

GroupA, groupB

ManA1 and manA2 belong to the groupA group, and manB1 and manB2 belong to the groupB group.

The directory structure is as follows:

 
 
  1. /Root directory
  2.  
  3.  
  4. ├ Ftproot/
  5.  
  6. │ Volume manager/
  7.  
  8.  
  9. │ ├ GroupA/
  10.  
  11. │ G0a1/
  12.  
  13. │ G0a2/
  14.  
  15. │ Large .../
  16.  
  17.  
  18. │ ├ GroupB/
  19.  
  20. │ 10000b1/
  21.  
  22. │ ├ B2/
  23.  
  24. │ Large .../
  25.  
  26.  
  27. .../

Permissions to be implemented:

1. User manager can read and write the manager, groupA, and groupB directories and Their subdirectories.

2. manA1 can read and write the A1 directory and all subdirectories of groupB.

3. manA2 can read and write the A2 directory and all subdirectories of groupB.

4. manB1 can read and write the B1 directory.

5. manB2 can read and write the B2 directory.

6. If a user does not have access to a directory, the user cannot see the directory.

7. Only manger users and group groupA and group B members are allowed to access the FTP server.

8. No one is allowed to break the main directory structure

2. Implementation

(1) Add users and groups

Useradd manager

Passwd manager

Groupadd groupA

Groupadd groupB

Useradd manA1

Passwd manA1

Usermod-G groupA manA1

Useradd manA2

Passwd manA2

Usermod-G groupA manA2

Useradd manB1

Passwd manB1

Usermod-G groupB manB1

Useradd manB2

Passwd manB2

Usermod-G groupB manB2


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.