由 lanmaster 在 06-12-2003 13:15 发表:
关于PROFTPD里如果指定用户访问某个目录的问题!
1<directory public="" web="">
2
3AllowOverwrite on
4
5</directory>
上面的设定是不是就FTP时所进入的主目录。
DefaultRoot ~ 而这个设置是确定一个用户只能访问自己的主目录
我上面说的也不知道对还是错(请指正)
我的情况是这样的。
我已经把 # DefaultRoot ~ 注释掉了。
现在想让用户在登陆服务器的时候直接进入/public/web的目录下面。
但登陆服务器的时候还是进入到/home/%U(用户的主目录)下面。
请问我是不是还得改动其它的配置。
在线请指教。
由 小皮 在 06-12-2003 13:35 发表:
DefaultRoot ~ 的作用就是让用户进入到/home/%U(用户的主目录)
当然也可以将用户限制在其他目录之下,而不是自己的home目录下:
DefaultRoot /tmp
一个人如果希望过上美好的生活,当然需要付出艰辛的劳动!
http://linux.ournb.net [宁波Linux社区]
由 lanmaster 在 06-12-2003 14:00 发表:
我已经把DefaultRoot ~给注释掉了。重新启动机器后,用户访问的时候还是能进入用户的主目录(用户为:lanmaster )
成长中的菜鸟!
E-Mail:qcy_[email protected]
QQ :7118899
由 lanmaster 在 06-12-2003 14:02 发表:
补充(PROFTPD.CONF)
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.
UseReverseDNS off
IdentLookups off
CommandBufferSize 128
DirFakeUser On FTP
DirFakeGroup On FTP
ServerName "My FTP Server "
ServerType standalone
DefaultServer on
Port 21 is the standard FTP port.
Port 21
Umask 022 is a good standard umask to prevent new dirs and files
from being group and world writable.
Umask 022
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
TimeoutLogin 30
TimeoutIdle 120
TimeoutNoTransfer 90
Set the user and group under which the server will run.
User nobody
Group nobody
To cause every FTP user to be "jailed" (chrooted) into their home
directory, uncomment this line.
DefaultRoot ~
MaxClients 10
RateReadBPS 1024000
MaxClientsPerHost 2
MaxClientsPeruser 5
DisplayLogin ./welcome.msg
DisplayFirstChdir ./message.msg
Normally, we want files to be overwriteable.
1<directory public="" web="">
2
3AllowOverwrite on
4
5</directory>
A basic anonymous configuration, no upload directories. If you do not
want anonymous users, simply delete this entire
1<anonymous> section.
2
3# <anonymous ~ftp="">
4
5# User</anonymous></anonymous>