荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: freeson (不奇), 信区: Linux
标  题: PROFTPD的Chroot限制
发信站: 荔园晨风BBS站 (Tue Jun 19 16:36:02 2001) , 转信



PROFTPD的Chroot限制

null null

〖返回〗〖转发〗

PROFTPD.CONF如何改?我要限制不同FTP USER在他自己目录读写,其他目录不可读写.请帮一

巴!!请看一下这个配置文件错在那里:(FTP USER AND FTP GROUP有了,控制目录是 /APP/FTP
DIR 允许目录是 /APP/FTPDIR/PEARL )
#
# Virtual Hosting Server Configuration
# for Frontier Internet Services Limited
#      (http://www.000.com/)
#
ServerName "Master Webserver"
#
# Spawn from inetd?
#
#ServerType         inetd
#
# or maybe a standalone server...
#
ServerType          standalone
#
# don't give the server banner until _after_ authentication
#
DeferWelcome off
#
# Some basic defaults
#
Port                  21
Umask                002
TimeoutLogin         120
TimeoutIdle          600
TimeoutNoTransfer    900
TimeoutStalled      3600
#
# No, I don't think we'll run as root!
#
User ftp
Group ftp

     # We want clients to be able to login with "anonymous" as well as "ftp"
        UserAlias               anonymous ftp
        RequireValidShell               no


#
# This is a non-customer usable name, (ie they should be connecting via www.{dom
ain})
# not 'hostname'.  Therefore let's dump them in a dummy account and wait for the
m to
# scream.
#
DefaultRoot /app/ftpdir/
#
# Performance, let's do DNS resolution when we process the logs...
#
UseReverseDNS        off
#
# Where do we put the pid files?
#
#ScoreboardPath /var/run/proftpd
#
# Logging options
#
#TransferLog /var/spool/syslog/proftpd/xferlog.legacy
#
# Some logging formats
#
#LogFormat         default "%h %l %u %t "%r" %s %b"
#LogFormat auth    "%v [%P] %h %t "%r" %s"
#LogFormat write   "%h %l %u %t "%r" %s %b"
#
# Global settings
#
<Global>
DisplayLogin    welcome.msg
DisplayFirstChdir    readme
#
# having to delete before uploading is a pain ;)
#
AllowOverwrite    yes
#
# Turn off Ident lookups
#
IdentLookups         off
#
# Logging
#
# file/dir access
#
# ExtendedLog /var/spool/syslog/proftpd/access.log WRITE,READ write
#
#
# Record all logins
#
# ExtendedLog /var/spool/syslog/proftpd/auth.log AUTH auth
#
# Paranoia logging level....
#
   ##ExtendedLog    /var/spool/syslog/proftpd/paranoid.log ALL default
</Global>

#
# Deny writing to the base server...
#
<Limit  WRITE>
DenyAll
</Limit>


# --------------------------------------------
# Virtual Servers start here....
#
# (Note: this is normally auto generated by a
# script written in house).
# --------------------------------------------
#
# ewftp.ewserver.com.
# This is the default server
# Gets all the connections for www.{customer.domain},
#
<VirtualHost 203.AAA.BBB.6>
ServerAdmin admin@ewserver.com
ServerName "ewMaster FTPserver"
MaxLoginAttempts 2
RequireValidShell no
# TransferLog /var/spool/syslog/proftpd/xferlog.www
MaxClients 50
DefaultServer on
#DefaultRoot ~ !staff
DefaultRoot         /app/ftpdir
AllowOverwrite yes

#
# No quickly do we kick someone out
#
TimeoutLogin 120
TimeoutIdle 600
TimeoutNoTransfer 900

<Limit LOGIN>
  DenyAll
</Limit>

<Anonymous /app/ftpdir>
  User    ftp
  Group   ftp
  UserAlias anonymous ftp
<Limit LOGIN>
  AllowAll
</Limit>

<Limit WRITE>
 DenyAll
</Limit>
# --------------------------------------------

# --------------------------------------------
<Directory /app/ftpdir/pearl>
#
# Block them from doing anything other than reading...
#
# <Limit READ WRITE CWD STOR RNFR DELE>
<Limit  WRITE CWD STOR RNFR DELE>
        AllowAll
</Limit>
</Directory>
</Anonymous>


</VirtualHost>

FLOATBOAT TOLD ME THIS BELOW,BUT DIDN'T WORK:
修改proftpd.conf,添加DefaultRoot ~ groupname
其中groupname为用户组的名,如添加一个新的用户username,和一个新的组groupname,要
将username限制在其主目录内只需要添加上面所说的那条语句到proftpd.conf中即可。切记
修改完之后要重新启动proftpd
----- Original Message -----

Subject: 请问怎样改PROFTPD的 配置文件以限制FTP 用户只能看/写自己的目录,不能去其

任何目录?


THANKS FLOATBOAT FOR 上次SENDMAIL811问题解决!
这次请教:
请问怎样改PROFTPD的 配置文件以限制FTP 用户只能看/写自己的目录,不能去其他任何目录
?
请把答案EMAIL 我/贴在你们的BBS(INCLUDING THIS MAIL),谢谢大虾相助!MY EMAIL:
 XIAOQIAN@ASINET.COM.SG  XIAOQIANCHINA@YAHOO.COM
GIFT FOR YOU:
一日晚,余漫步三教平台,但见一女翩然而来,长发飘飘,不禁为之侧目。须臾走近,此女
猛然停
住,注视与我。余暗道:“吾岂非很帅”! 但见伊睁大双眼,嘴角抽动,吾叹到:“吾莫

太丑”?却见伊双目愈瞪愈大,嘴亦越张越开。吾大恐,暗道吾平日乃真君子,不曾冒犯于
她,何况不曾相识?吾几欲转身远遁,忽听伊大喊一声 “啊 !!嚏 。。。”伊揉揉鼻子

飘然远去。吾已大汗淋漓矣 。




--
※ 来源:.荔园晨风BBS站WWW bbs.szu.edu.cn. [FROM: 210.39.3.80]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店