freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

用linux架設(shè)ftp服務(wù)器(更新版)

  

【正文】 l 和 guest用戶訪問(wèn)家目錄之外的目錄。 log transfers 因?yàn)榘踩募枰盐募膫鬏敹加涗浵聛?lái) ??梢栽O(shè)定多個(gè)消息。可以用下面這一行來(lái)表示: loginfails < n> < n>表示最多允許的登錄失敗的次數(shù)。 “l(fā)imit” 的格式是: limit < class> < n> < times> < message_file> 其中< class>是受限制的類別( class),< n>表示在這個(gè)類別中受到限制的最多用戶數(shù),<times>表示 “l(fā)imit” 有效的時(shí)間段,< message_file>是當(dāng)達(dá)到最大的用戶數(shù)目的時(shí)候,別的用戶還想登錄時(shí)顯示的信息??梢远x任意多的類別( class)。不管是打算自己動(dòng)手生成配置文件還是拷貝現(xiàn)成的,你都 要學(xué)會(huì)自己修改配置文件并且把配置文件拷貝到正確的目錄下。 第一步 創(chuàng)建改變根文件系統(tǒng)( chrooted)環(huán)境所需要的所有的目錄: [rootdeep] mkdir /home/ftp/dev [rootdeep] mkdir /home/ftp/etc [rootdeep] mkdir /home/ftp/bin (require only if you are not using the “ enablels” option) [rootdeep] mkdir /home/ftp/lib (require only if you are not using the “ enablels” option) 第二步 把新目錄的權(quán)限設(shè)成 0511: [rootdeep] chmod 0511 /home/ftp/dev [rootdeep] chmod 0511 /home/ftp/etc [rootdeep] chmod 0511 /home/ftp/bin (require only if you are not using the “ enablels” option) [rootdeep] chmod 0511 /home/ftp/lib (require only if you are not using the “ enablels” option) 上面這些 “chmod” 命令把 chrooted之后的 “dev” 、 “etc” 、 “bin” 和 “l(fā)ib” 目錄設(shè)置成超級(jí)用戶 “root” 可讀、可執(zhí)行,用戶組和所有用戶可執(zhí)行。第一部分 “/home/ftp/” 表示 “chroot” 時(shí)作為根目錄的目錄 。 第一步 用下面的命令在 “/etc/passwd” 文件中創(chuàng)建用戶。 “touch” 命令為 xferstats在“/var/log” 目錄下創(chuàng)建日志文件。 在這一節(jié)里,我們把 FTP 配置成 “chrooted” 的方式,這種配置運(yùn)行用戶訪問(wèn),例如: Web 站點(diǎn)的目錄,但是不允許他們?cè)L問(wèn)更高一層的目錄。 您的位置: 欄目分類 軟件 服務(wù)器軟件 FTP 服務(wù)器 用 Linux 架設(shè) FTP 服務(wù)器 (上 ) 20200720 16:29 /(天極論壇 ) 1 2 3 4 5 6 下一頁(yè) 概述 使用文件傳輸協(xié)議( FTP)來(lái)通過(guò)網(wǎng)絡(luò)在計(jì)算機(jī)之間傳輸文件是很普遍的一種方法。因?yàn)榭赡艽嬖跐撛诘陌踩珕?wèn)題,必須小心配置使得只允許訪問(wèn)系統(tǒng)中特定的目錄。 “install – m” 安裝 “xferstats” 程序,用于統(tǒng)計(jì)傳輸了多少文件。 “chroot” 使用戶產(chǎn)生這樣的感覺(jué)好像自己已經(jīng)在文件系統(tǒng)的最頂層了。 編輯 “passwd” 文件( vi /etc/passwd),把下面這一行改為: ftpadmin:x:502:502::/home/ftp/ftpadmin/:/dev/null 改為: ftpadmin:x:502:502::/home/ftp/./ftpadmin/:/dev/null 帳號(hào)為 “ftpadmin” ,這這個(gè)帳號(hào)的家目錄有一些奇怪。不過(guò)我們還是介紹一下舊的方法,也就是把 “/bin/ls” 拷貝到“/home/ftp/bin” ( chroot 之后就是 “/bin” )目錄下,然后把相關(guān)的運(yùn)行庫(kù)拷貝到 “/home/ftp/lib”目錄下。這樣就沒(méi)有必要手工重新生成這些文件,或者用拷貝粘貼的方法把它們粘貼到配置文件中去。 創(chuàng)建 ftpaccess文件( touch /etc/ftpaccess),在文件中加入: class openarch guest .* limit openarch 20 MoTuWeTh,Fr00001800 /home/ftp/. loginfails 3 readme README* login readme README* cwd=* message /home/ftp/. login message .message cwd=* press yes all tar yes all chmod yes guest delete yes guest overwrite yes guest rename yes guest log mands real,guest log transfers real,guest inbound,outbound guestgroup ftpadmin guestgroup webmaster We don‘t want users being able to upload into these areas. upload /home/ftp/* / no upload /home/ftp/* /etc no upload /home/ftp/* /dev no We‘ll prevent downloads with noretrieve. noretrieve /home/ftp/etc noretrieve /home/ftp/dev log security real,guest guestroot /home/ftp ftpadmin webmaster restricteduid ftpadmin webmaster restrictedgid ftpadmin webmaster greeting terse Keepalive yes noretrieve .notar 現(xiàn)在把文件的權(quán)限設(shè)成 600: [rootdeep] chmod 600 /etc/ftpaccess 下面解釋配置文件中的設(shè)置: class “class” 用來(lái)定義一個(gè)允許訪問(wèn) ftp服務(wù)器的用戶類別。 limit “l(fā)imit” 根據(jù) class和時(shí)間范圍來(lái)限制登錄 ftp服務(wù)器的用戶數(shù)。 loginfails “l(fā)oginfails” 設(shè)置最多允許的登錄失敗的次數(shù)。 message “message” 設(shè)置當(dāng)用戶登錄或轉(zhuǎn)到一個(gè)目錄的時(shí)候會(huì)收到什么消息。 例如:要記錄 real 和 guest用戶的每一個(gè)命令,可以這么表示: log mands real,guest 這些記錄都保存在 “/var/log/message” 文件中。 “real”表示真正在 ftp 服務(wù)器上有帳號(hào)的用戶, “anonymous” 表示匿名用戶, “guest” 表示 guest 用戶。 例如: greeting terse keepalive < yes|no> 設(shè)置 socket的 TCP SO_KEEPALIVE 參數(shù)。 配置 “/etc/ftpusers” 文件 “/etc/ftpusers” 文件設(shè)置哪些用戶不允許連接到 ftp服務(wù)器。 FTP 管理工具 ftpwho ftpwho 顯示當(dāng)前連接到 ftp 服務(wù)器上的所有用戶。在我們配置的 ftp 服務(wù)器中為 “/home/ftp” 目錄下的“bin” 、 “etc” 、 “dev” 和 “l(fā)ib
點(diǎn)擊復(fù)制文檔內(nèi)容
公司管理相關(guān)推薦
文庫(kù)吧 www.dybbs8.com
備案圖鄂ICP備17016276號(hào)-1