Proftpd權(quán)限的設(shè)置原理是什么

這篇文章主要講解了“Proftpd權(quán)限的設(shè)置原理是什么”,文中的講解內(nèi)容簡單清晰,易于學(xué)習(xí)與理解,下面請(qǐng)大家跟著小編的思路慢慢深入,一起來研究和學(xué)習(xí)“Proftpd權(quán)限的設(shè)置原理是什么”吧!

在雜多等地區(qū),都構(gòu)建了全面的區(qū)域性戰(zhàn)略布局,加強(qiáng)發(fā)展的系統(tǒng)性、市場(chǎng)前瞻性、產(chǎn)品創(chuàng)新能力,以專注、極致的服務(wù)理念,為客戶提供網(wǎng)站設(shè)計(jì)制作、網(wǎng)站建設(shè) 網(wǎng)站設(shè)計(jì)制作按需制作,公司網(wǎng)站建設(shè),企業(yè)網(wǎng)站建設(shè),成都品牌網(wǎng)站建設(shè),成都營銷網(wǎng)站建設(shè),成都外貿(mào)網(wǎng)站建設(shè)公司,雜多網(wǎng)站建設(shè)費(fèi)用合理。

一、測(cè)試平臺(tái)

Debian 4.0r3

Proftpd 1.3.1 (WITH SSL)

二、原理簡介

1、 繼承性

子目錄會(huì)繼承其父目錄的屬性。

2、 優(yōu)先級(jí)

優(yōu)先級(jí)由大到小的順序:

原始FTP命令(LIST DELE等) > 命令組(DIRS READ WRITE) > ALL命令組

3、 訪問控制的應(yīng)用順序

不論出現(xiàn)順序如何,先應(yīng)用拒絕(Deny),后應(yīng)用允許(Allow)

4、系統(tǒng)權(quán)限

Linux系統(tǒng)權(quán)限仍然起作用。如果設(shè)置了目錄test的允許寫,但是該用戶對(duì)test目錄只有

讀權(quán)限,這是該用戶就不能向test目錄寫入。

-----------------? 1、繼承性

-------------------------? 2、優(yōu)先級(jí)

AllowUser u1 --------------------? 3、訪問控制的應(yīng)用順序

DenyAll

一點(diǎn)解釋:根據(jù)參考1所述,訪問控制的順序應(yīng)該是與其出現(xiàn)順序有關(guān),但是在我的測(cè)試中發(fā)現(xiàn)出現(xiàn)順序沒有什么影響。也就是說,像上面的訪問控制,AllowUser u1和DenyAll哪個(gè)在前面都一樣。

三、實(shí)例

1、簡介

假設(shè)proftpd服務(wù)器上有5個(gè)用戶:

manager, manA1, manA2, manB1, manB2

和2個(gè)組:

groupA, groupB

manA1和manA2屬于groupA組,manB1和manB2屬于groupB組。

并且有如下目錄結(jié)構(gòu):

/根目錄   │   ├ftproot/   │ ├m(xù)anager/   │ │   │ ├groupA/   │ │ ├A1/   │ │ ├A2/   │ │ └.../   │ │   │ ├groupB/   │ ├B1/   │ ├B2/   │ └.../   │   └.../

現(xiàn)在要實(shí)現(xiàn)的權(quán)限:

1、用戶manager可以讀寫manager、groupA、groupB目錄及它們的的子目錄。

2、manA1可以讀寫A1目錄,并且可以讀寫groupB的所有子目錄。

3、manA2可以讀寫A2目錄,并且可以讀寫groupB的所有子目錄。

4、manB1可以讀寫B(tài)1目錄。

5、manB2可以讀寫B(tài)2目錄。

6、如果一個(gè)用戶沒有某個(gè)目錄的訪問權(quán)限,那么該用戶就不能看到此目錄。

7、只允許manger用戶和groupA、groupB組成員訪問FTP服務(wù)器。

8、不允許任何人破壞主干目錄結(jié)構(gòu)

2、實(shí)現(xiàn)

(1)添加用戶和組

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

(2)配置文件

# This is a basic ProFTPD configuration file (rename it to   # 'proftpd.conf' for actual use. It establishes a single server   # and a single anonymous login. It assumes that you have a user/group   # "nobody" and "ftp" for normal operation and anon.

ServerName "Formax BPO FTP Server"

ServerType standalone

DefaultServer on

# Port 21 is the standard FTP port.

Port 21

UseReverseDNS off

IdentLookups off# Umask 022 is a good standard umask to prevent new dirs and files

# from being group and world writable.

Umask 000

# To prevent DoS attacks, set the maximum number of child processes   # to 30. If you need to allow more than 30 concurrent connections   # at once, simply increase this value. Note that this ONLY works   # in standalone mode, in inetd mode you should use an inetd server   # that allows you to limit maximum number of processes per service   # (such as xinetd).

MaxInstances 30

# Set the user and group under which the server will run.

User nobody

Group nogroup

# To cause every FTP user to be "jailed" (chrooted) into their home   # directory, uncomment this line.   # DefaultRoot ~

DefaultRoot /ftproot

# Normally, we want files to be overwriteable.

AllowOverwrite on

AllowStoreRestart on

ServerIdent off

TLSEngine on

TLSLog /var/ftpd/tls.log

TLSProtocol SSLv23

# Are clients required to use FTP over TLS when talking to this server?

TLSRequired on

# Server's certificate

TLSRSACertificateFile /etc/proftpd.cert

TLSRSACertificateKeyFile /etc/proftpd.key

# CA the server trusts

TLSCACertificateFile /etc/proftpd.cert

# Authenticate clients that want to use FTP over TLS?

TLSVerifyClient off

TLSOptions NoCertRequest

# Allow SSL/TLS renegotiations when the client requests them, but   # do not force the renegotations. Some clients do not support   # SSL/TLS renegotiations; when mod_tls forces a renegotiation, these   # clients will close the data connection, or there will be a timeout   # on an idle data connection.

TLSRenegotiate required off

# Bar use of SITE CHMOD by default

感謝各位的閱讀,以上就是“Proftpd權(quán)限的設(shè)置原理是什么”的內(nèi)容了,經(jīng)過本文的學(xué)習(xí)后,相信大家對(duì)Proftpd權(quán)限的設(shè)置原理是什么這一問題有了更深刻的體會(huì),具體使用情況還需要大家實(shí)踐驗(yàn)證。這里是創(chuàng)新互聯(lián),小編將為大家推送更多相關(guān)知識(shí)點(diǎn)的文章,歡迎關(guān)注!

網(wǎng)站欄目:Proftpd權(quán)限的設(shè)置原理是什么
文章轉(zhuǎn)載:http://bm7419.com/article30/ipoepo.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供虛擬主機(jī)、網(wǎng)站導(dǎo)航、靜態(tài)網(wǎng)站營銷型網(wǎng)站建設(shè)、外貿(mào)網(wǎng)站建設(shè)

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來源: 創(chuàng)新互聯(lián)

手機(jī)網(wǎng)站建設(shè)