- 论坛徽章:
- 0
|
用vsftp自架Linux网络安装服务器,以及Redhat局域网安装的解决办法
约定:
1。本帖操作环境是Redhat 9.0,VSFTPD的版本是Redhat 9.0所带的vsftpd-1.1.3-8.i386.rpm,在安装盘的第三张中
2。VSFTPD实现的最基本的目的:用系统中存在的真实用户能登入FTP,能用匿名访问。
3。服务器的IP和和DNS设定
第一块网卡
IP:192.168.0.1
子掩码:255.255.255.0
网关不设置:
第二块网卡:
IP:192.168.0.2
子掩码:255.255.255.0
网关不设置
因为我的操作环境是一个小型的局域网,所以其它的机器的IP都是在192.168.0这个网段上。ADSL是接在服务器的第一个网卡上。服务器的第二个网卡是接集线器,其它的客户机都是接在集线器上。为了能让ADSL访问internet,因为自己手动设置了IP,所以DNS也要自己来设置,DNS如下:
202.96.134.133
202.96.168.68
设置工具是:
[root@linuxsir001 root]# redhat-config-network
一。用VSFTP来架设FTP服务器,VSFTP服务器是目前最好的FTP服务器软件,优点是体积小,可定制强,效率高
1。查看是否安装了vsftpd软件
[root@linuxsir001 root]# rpm -qa | grep vsftpd
如果没有任何显示,说明没有把vsftpd安装上,如果出现的是下面的这样的提示,就证明已经安装上了。
[root@linuxsir001 root]# rpm -qa | grep vsftpd
vsftpd-1.1.3-8
我以Redhat 9.0,以其自带的vsftpd包vsftpd-1.1.3-8版本来为本帖约定。
[root@linuxsir001 root]# rpm -ivh vsftpd*.rpm
2。打开VSFTP服务器。
[root@linuxsir001 root]# ntsysv
把vsftpd服务器打开,也就是在运行 ntsysv命令后,把vsftpd服务选中。
vsftpd
3。运行/etc/init.d/vsftpd start
[root@linuxsir001 root]# /etc/init.d/vsftpd start
为 vsftpd 启动 vsftpd: [ 确定 ]
[root@linuxsir001 root]#
4。配制VSFTP,FVSFTP的运行有两种模式,一种是stardard "initd模式,另外一种是xinetd模式,上面我们所说的就是stardard initd运行模式。两种模式运行机制不是相同的,stardard initd模式,适合专业FTP,且FTP总是一直有人访问,占用资源也是比较大,如果您的FTP总是有人访问和登入。就要用这种模式。如果您的FTP访问人数比较小,建议您用xinetd模式。xinetd模式,是当用户请求时,vsftpd才会启动。
不同的环境,当然得用不同的启动模式。
如果想了解更多的,请在本帖后面跟帖,我会慢慢补充xinetd模式,以及虚拟用户如何设置方面的问题。
1]我们主要把vsftp的配制文件改一下就行了。配制文件在/etc/vsftpd/vsftpd.conf,用您喜欢的编辑器打开。请参考下面的配制文件。
# Example config file /etc/vsftpd.conf
#
# The default compiled in settings are very paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
#
# Allow anonymous FTP?
anonymous_enable=YES
#
# Uncomment this to allow local users to log in.
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
write_enable=YES
#
# Default umask for local users is 077. You may wish to change this to 022,
# if your users expect that (022 is used by most other ftpd's)
local_umask=022
#
# Uncomment this to allow the anonymous FTP user to upload files. This only
# has an effect if the above global write enable is activated. Also, you will
# obviously need to create a directory writable by the FTP user.
#anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
#anon_mkdir_write_enable=YES
#
# Activate directory messages - messages given to remote users when they
# go into a certain directory.
dirmessage_enable=YES
#
# Activate logging of uploads/downloads.
xferlog_enable=YES
#
# Make sure PORT transfer connections originate from port 20 (ftp-data).
connect_from_port_20=YES
#
# If you want, you can arrange for uploaded anonymous files to be owned by
# a different user. Note! Using "root" for uploaded files is not
# recommended!
#chown_uploads=YES
#chown_username=whoever
#
# You may override where the log file goes if you like. The default is shown
# below.
#xferlog_file=/var/log/vsftpd.log
#
# If you want, you can have your log file in standard ftpd xferlog format
xferlog_std_format=YES
#
# You may change the default value for timing out an idle session.
#idle_session_timeout=600
#
# You may change the default value for timing out a data connection.
#data_connection_timeout=120
#
# It is recommended that you define on your system a unique user which the
# ftp server can use as a totally isolated and unprivileged user.
#nopriv_user=ftpsecure
#
# Enable this and the server will recognise asynchronous ABOR requests. Not
# recommended for security (the code is non-trivial). Not enabling it,
# however, may confuse older FTP clients.
#async_abor_enable=YES
#
# By default the server will pretend to allow ASCII mode but in fact ignore
# the request. Turn on the below options to have the server actually do ASCII
# mangling on files when in ASCII mode.
# Beware that turning on ascii_download_enable enables malicious remote parties
# to consume your I/O resources, by issuing the command "SIZE /big/file" in
# ASCII mode.
# These ASCII options are split into upload and download because you may wish
# to enable ASCII uploads (to prevent uploaded scripts etc. from breaking),
# without the DoS risk of SIZE and ASCII downloads. ASCII mangling should be
# on the client anyway..
#ascii_upload_enable=YES
#ascii_download_enable=YES
#
# You may fully customise the login banner string:
#ftpd_banner=Welcome to blah FTP service.
#
# You may specify a file of disallowed anonymous e-mail addresses. Apparently
# useful for combatting certain DoS attacks.
#deny_email_enable=YES
# (default follows)
#banned_email_file=/etc/vsftpd.banned_emails
#
# You may specify an explicit list of local users to chroot() to their home
# directory. If chroot_local_user is YES, then this list becomes a list of
# users to NOT chroot().
#chroot_list_enable=YES
# (default follows)
#chroot_list_file=/etc/vsftpd.chroot_list
#
# You may activate the "-R" option to the builtin ls. This is disabled by
# default to avoid remote users being able to cause excessive I/O on large
# sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
# the presence of the "-R" option, so there is a strong case for enabling it.
#ls_recurse_enable=YES
pam_service_name=vsftpd
userlist_enable=YES
#enable for standalone mode
listen=YES
tcp_wrappers=YES
2]更改完配制文件后,我们可以用下面的命令来重启VSFTPD服务器
[root@linuxsir001 root]# /etc/init.d/vsftpd restart
关闭 vsftpd: [ 确定 ]
为 vsftpd 启动 vsftpd: [ 确定 ]
[root@linuxsir001 root]#
3]以匿名方式来访问测试,在text模式下:
注意:在text模式下,要用用户名ftp,密码ftp来访问,这才是在text中匿名访问FTP。看如下的操作:
[root@linuxsir001 root]# ftp 192.168.0.1
Connected to 192.168.0.1.
220 (vsFTPd 1.1.3)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.0.1:root): ftp 这里写上ftp
331 Please specify the password.
Password:[这里添写ftp的密码],匿名登入密码也是ftp
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp> ls
227 Entering Passive Mode (192,168,0,1,137,151)
150 Here comes the directory listing.
drwxr-xr-x 6 0 0 4096 May 25 13:54 RedHat90
drwxr-xr-x 2 0 0 4096 Feb 28 19:21 pub
226 Directory send OK.
ftp>
那匿名用户所访问的是哪个目录?是/var/ftp这个目录
出现问题的解决:有时出错,是因为没有ftp和nobody用户,所以要在系统中添加这两个用户,一般的情况下,这两个用户在系统中是存在的。看下面的操作。
[root@linuxsir001 root]# adduser ftp
adduser: user ftp exists
[root@linuxsir001 root]# adduser nobody
adduser: user nobody exists
从上面的操作中可知ftp和nobody用户是存在的,所以没有必要添加ftp和nobody用户了。如果不存在,一定要添加这两个用户,否则会出现匿名用户不能访问的情况。
4]如果要以系统中存在的普通用户登入FTP,也没有什么可以设置的,添加一个用户就行。比如我要添加beinan这个用户,就要用下面的办法
[root@linuxsir001 root]# adduser beinan
[root@linuxsir001 root]# passwd beinan
Changing password for user beinan.
New password:
BAD PASSWORD: it does not contain enough DIFFERENT characters
Retype new password:
passwd: all authentication tokens updated successfully.
[root@linuxsir001 root]#
这样的话,就在/home目录中出现一个beinan的用户目录:如下:
[root@linuxsir001 root]# ls /home/
beinan
如果我们想让beinan这个用户作为虚拟用户,也就是说,beinan这个用户是不能登入系统的,只能是登入FTP。 那这样的用户应该如何添加呢??
[root@linuxsir001 backupNow]# adduser -g ftp -s /sbin/nologin beinan
[root@linuxsir001 backupNow]# passwd beinan
Changing password for user beinan.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@linuxsir001 backupNow]#
注:这仅仅是VSFTP添加虚拟用户的一个方法,还有更好的办法需要我们去学习!另外的办法也在测试之中。严格上来说,这种办法不能算虚拟用户。还有另外的一个办法,就是通过pam认证,用db_load来添加用户,目前我也弄成功了,不过相对要复杂一点。正在测试之中。
如果我们想把用户目录定位到别的目录应该怎么办呢??这个也比较简单,看一下useradd就比较明白了。比如我想添加beinan这个用户,并把目录放在/opt目录中:如下操作:
[root@linuxsir001 root]# adduser -d /opt/beinan beinan
[root@linuxsir001 root]# passwd beinan
Changing password for user beinan.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
如果是添加虚拟用户,也就是不让用户登入系统,只能登入FTP的用户。如果我们想把beinan这个用户目录定位在/opt/beinan这个目录中,根据上面的方法。我们应该如下操作
[root@linuxsir001 backupNow]# adduser -d /opt/beinan -g ftp -s /sbin/nologin beinan
[root@linuxsir001 backupNow]# passwd beinan
Changing password for user beinan.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
[root@linuxsir001 backupNow]#
看一下是不是已经成功添加到了beinan这个用户,并把beinan的家目录放在了/opt目录中呢??
[root@linuxsir001 root]# ls /opt/
beinan
证明已经成功。
我们可以在text模式下以beinan用户登入,然后来访问ftp。
[root@linuxsir001 root]# ftp 192.168.0.1
Connected to 192.168.0.1.
220 (vsFTPd 1.1.3)
530 Please login with USER and PASS.
530 Please login with USER and PASS.
KERBEROS_V4 rejected as an authentication type
Name (192.168.0.1:root): beinan
331 Please specify the password.
Password:
230 Login successful. Have fun.
Remote system type is UNIX.
Using binary mode to transfer files.
ftp>
是不是成功了???
我们也可以用gftp来访问beinan用户,并上传相应的东西,所传上的东西就放在beinan用户所在的家目录中,普通用户的家目录在哪里,写您所用的添加用户的方法有关。我在前面已经说了两种办法,一种是默认的添加方法,就是放在/home目录中。
在本例中,我是采用默认的添加用户的方法。也就是不特别指定用户用户,这样的话,用户目录就在/home目录中。比如用beinan登入FTP时,访问的就是/home/beinan这个目录。让传的东西也在这个目录中。
那匿名用户所访问的是哪个目录呢???
应该是:/var/ftp这个目录
5]访问ftp的几种方法
第一种方法就是text访问,也就是用ftp命令来访问。这个前面已经说过了。
第二种方法是以客户端FTP软件来访问,在linux中有gftp。在本例中,我的FTP地址是通过局域网访问的。地址栏中,添上192.168.0.1,端口是21,用户名和密码的添写,如果您是用匿名登入,请不要添写用户名和密码。如果用普通用户登入,这个是必须要用用户名和密码的。
第三种办法是和浏览器访问:如果匿名登入,就直接用下面的方法:
ftp://192.168.0.1
如果是用户登入方式,应该是
ftp://beinan@192.168.0.1
如果想让在互联网上的用户能访问到,如果您是用ADSL来访问互联网,要查找到您的动态IP,用下面的办法
[root@linuxsir001 root]# ifconfig ppp0
ppp0 Link encap:Point-to-Point Protocol
inet addr:218.61.7.23 P-t-P:218.61.7.1 Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:24245 errors:0 dropped:0 overruns:0 frame:0
TX packets:20411 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:23103297 (22.0 Mb) TX bytes:3588337 (3.4 Mb)
从上面的可以知道,能让在internet访问的地址是:218.61.7.23
二。如何让局域网通过这个FTP安装Linux呢??以Redhat 9.0为例:
1。我们要在/var/ftp中,为每个发行版建一个目录,然后把每个发行版的每个版本再建一个目录。把每个版本的ISO都解压到相应的目录里。举个例子:
比如我想让其它的客户机,通过我的服务器来安装Redhat9.0,我就要在/var/ftp目录中建一个RedHat90的目录,然后把RedHat 9.0的三个ISO都解到这个目录中。
这样服务器的设置就完成了。
2。客户机方面如何引导及设置???我们可以做一个系统的引志盘,但有的发行版也没有必要。这也要以各个发行版的情况而定。比如Redhat 9.0的安装,如果您的客户机上有windows,就直接通过局域网的FTP,dosutils images isolinux三个目录放到一个在fat32分区中建的目录中,比如说在客户机上建一个Redhat9的目录,然后把三个文件拷到客户机中的fat32分区中的Redhat9的目录中。
3.客户机安装及操作:
以DOS盘引导,不要加载CDROM,直接进入客户机中fat32分区Redhat9dosutils目录,执行下面的命令。
autoboot
这样就开始了安装:
4.出现的画面中,我们要选ftp安装。在设置网络环境时,我们要设置好IP和网关之类的。
以我的局域网为例:
客户机的IP设置成192.168.0.5,掩码也是2552555.255.0,网关设置成192.168.0.1。name 服务可以不设置。以匿名方式访问FTP。
下一步会出现让我们添写FTP,及安装源的地址,还是以我的局域网为例:
地址:192.168.0.1
路径:因为我是把三个ISO放在了/var/ftp/RedHat90的目录下,我应该写如下的
/RedHat90
这样就OK了,一切和其它的安装方式都是一样的了。
因为每个发行版不太一样,所以通过网络安装,有的要做引导盘,如何做引导盘,我想大家早就知道了。如果不知道这方面的,请用搜索来找这方面的帖子。
安装配置一个proftpd的实例
http://www.chinaunix.net 作者:wd 发表于:2004-06-11 16:22:19
安装配置一个proftpd的实例
目的:
安装配置一个proftpd,达到以下要求
1 不允许匿名访问。
2 开放一个帐号,只有在upload目录有上传权限,可以续传,不能改名和删除。
操作:
0 切换到root帐户
[code:1:0258b10472] su root //输入root的密码。
[/code:1:0258b10472]
1 下载proftpd
地址:www.proftpd.org。这里我们下载了1.2.9版本
[code:1:0258b10472] wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.2.9.tar.gz
[/code:1:0258b10472]
2 安装proftpd
切换到下载目录,假设为/tmp/proftpd,然后
[code:1:0258b10472] tar zxvf proftpd-1.2.9.tar.gz //解压
cd proftpd-1.2.9
./configure --prefix=/var/proftpd --sysconfdir=/etc //设置安装目录/var/proftpd,配置文件目录/etc
make
make install
[/code:1:0258b10472]
3 新建ftp专用帐号
就是上面目的中提到的那个专用帐号,这里以skate/skate(u/p)为例。
[code:1:0258b10472] groupadd skate
useradd skate -g skate -d /var/ftp -s /sbin/nologin //设置/var/ftp目录为ftp的目录
passwd skate //设置skate用户的密码
mkdir /var/ftp/upload
chown skate.skate /var/ftp/upload //设置upload目录skate用户可写
[/code:1:0258b10472]
4 设置proftpd
proftpd的配置文件就一个,就是/etc/proftpd.conf
[code:1:0258b10472] vi /etc/proftpd.conf //打开proftpd.conf
[/code:1:0258b10472]
[code:1:0258b10472]
####具体配置如下######
ServerName "Test ftp server..."
ServerType standalone
DefaultServer on
#端口
Port 21
Umask 022
#最大线程数
MaxInstances 30
User skate
Group skate
#DNS反查
UseReverseDNS off
IdentLookups off
#最大尝试连接次数
MaxLoginAttempts 3
#每用户线程
MaxClientsPerHost 2
#最大用户数
MaxClients 20
DirFakeUser On skate
DirFakeGroup On skate
DeferWelcome On
#日志文件位置
SystemLog /var/log/proftpd.log
ServerIdent off
#限制skate组的skate用户登录时不能切换到其他目录(只能呆在他的home目录)
DefaultRoot ~ skate,skate
#设置只允许192.168.0的用户登录
#
#Order allow,deny
#Allow from 192.168.0.
#Deny from all
#
#设置只允许skate用户登录,否则系统用户也可以登录ftp
#
#Order allow,deny
#DenyUser !skate
#
#开起全盘的写权限
AllowOverwrite on
AllowStoreRestart on
#允许FXP
# AllowForeignAddress on
AllowAll
#设置skate用户在upload的限制
#DELE删除权限
#RNFR RNTO重命名权限
#RMD XRMD移动目录权限
DenyUser skate
#####结束######
[/code:1:0258b10472]
编辑完以后按Esc,然后输入:x保存。
5 启动服务
编辑一个启动脚本(这个是proftpd自带的,做了一点小修改)
[code:1:0258b10472] vi /etc/rc.d/init.d/proftpd[/code:1:0258b10472]
[code:1:0258b10472]
#####脚本内容开始########
#!/bin/sh
#
# Startup script for ProFTPD
#
# chkconfig: 345 85 15
# description: ProFTPD is an enhanced FTP server with
# a focus toward simplicity, security, and ease of configuration.
# It features a very Apache-like configuration syntax,
# and a highly customizable server infrastructure,
# including support for multiple 'virtual' FTP servers,
# anonymous FTP, and permission-based directory visibility.
# processname: proftpd
# config: /etc/proftpd.conf
#
# By: Osman Elliyasa
# $Id: proftpd.init.d,v 1.7 2002/12/07 21:50:27 jwm Exp $
# Source function library.
. /etc/rc.d/init.d/functions
if [ -f /etc/sysconfig/proftpd ]; then
. /etc/sysconfig/proftpd
fi
#下面这行设置环境变量,注意设置好你的proftpd的安装目录
PATH="$PATH:/usr/local/sbin:/var/proftpd/bin:/var/proftpd/sbin"
# See how we were called.
case "$1" in
start)
echo -n "Starting proftpd: "
daemon proftpd $OPTIONS
echo
touch /var/lock/subsys/proftpd
;;
stop)
echo -n "Shutting down proftpd: "
killproc proftpd
echo
rm -f /var/lock/subsys/proftpd
;;
status)
status proftpd
;;
restart)
$0 stop
$0 start
;;
reread)
echo -n "Re-reading proftpd config: "
killproc proftpd -HUP
echo
;;
suspend)
hash ftpshut >/dev/null 2>&1
if [ $? = 0 ]; then
if [ $# -gt 1 ]; then
shift
echo -n "Suspending with '$*' "
ftpshut $*
else
echo -n "Suspending NOW "
ftpshut now "Maintanance in progress"
fi
else
echo -n "No way to suspend "
fi
echo
;;
resume)
if [ -f /etc/shutmsg ]; then
echo -n "Allowing sessions again "
rm -f /etc/shutmsg
else
echo -n "Was not suspended "
fi
echo
;;
*)
echo -n "Usage: $0 {start|stop|restart|status|reread|resume"
hash ftpshut
if [ $? = 1 ]; then
echo '}'
else
echo '|suspend}'
echo 'suspend accepts additional arguments which are passed to ftpshut(8)'
fi
exit 1
esac
if [ $# -gt 1 ]; then
shift
$0 $*
fi
exit 0
#######脚本结束#########
[/code:1:0258b10472]
按Esc,输入:x保存。
修改权限,然后添加到系统服务并启动
[code:1:0258b10472]
chmod +x /etc/rc.d/init.d/proftpd
chkconfig --add proftpd
service proftpd start[/code:1:0258b10472]
以后可以用service proftpd restart来重起proftpd。
6 一点体会
看proftpd的文档翻译过的一句话:Finally, a special command is allowed which can be used to control login access: LOGIN Connection or login to
the server. Applying a to this pseudo-command can be used to allow or deny initial connection or login to the context. It has no
effect, and is ignored, when used in a context other than server config, or (i.e. using it in a context
is meaningless).
翻译下:最后,有一个用来限制登陆的特殊命令,就是LOGIN。在中用这个,可以禁止或者允许连接进来。但是,如果不在Server config,
或者中使用的话,他将失去效用,或者说被忽略掉(比如在中使用就是无效的)。
proftpd感觉还是比vsftp功能配置上好用一点,主要掌握好段基本上应用来说就没有问题了。
proftpd文档地址http://www.proftpd.org/docs/。[/code]
修改了好几次了,之前有些笔误和忘记写的地方,有什么问题大家提出来,我会及时修改的。谢谢。
【发表回复】【查看论坛原帖】【添加到收藏夹】【关闭】
wd 回复于:2004-06-11 16:28:50
虽然关键内容不是我的原创,比如那个脚本(我不会写脚本,呵呵),可是好歹也写了半天,呵呵。
欢迎拍转。
daminggege 回复于:2004-06-13 15:48:41
我照着别人的配置都不能运行,用这个可以
比较一下好像就这两句有区别,麻烦告知
daminggege 回复于:2004-06-13 16:02:24
照着http://www.chinaunix.net/jh/15/247811.html,设置
useradd -d /home/kaoyan -g ftpusers -s /bin/false kaoyan
useradd -d /home/kaoyan -g ftpusers -s /bin/false upload
不能访问,如果把false换成bash就可以,为什么???!??!
mswhome 回复于:2004-06-13 16:14:22
有没有人告诉我为什么我的Linux上不能使用chkconfig命令?
wd 回复于:2004-06-14 13:41:36
[quote:aadb08de32="daminggege"]照着http://www.chinaunix.net/jh/15/247811.html,设置
useradd -d /home/kaoyan -g ftpusers -s /bin/false kaoyan
useradd -d /home/kaoyan -g ftpusers -s /bin/false upload
不能访问,如果把false换成bash..........[/quote:aadb08de32]
把false换成nologin也可以。
daminggege 回复于:2004-06-14 18:03:44
楼主,能否清楚的解释一下
wd 回复于:2004-06-14 20:41:32
不太清楚,呵呵
是不是因为系统没有/bin/false这个shell啊?
daminggege 回复于:2004-06-14 21:52:33
false,好象是不为此用户提供shell环境
这样是不是更安全呢?
本人菜鸟,多谢指教
wd 回复于:2004-06-15 08:50:35
nologin也是这个效果。。。
smgxnet 回复于:2004-06-16 22:54:16
请问要求不同目录,有不同用户和各自的权限能够ftp进去,该怎么做???
例如:test用户拥有11文件夹的写权限,test2用户拥有22文件夹的写权限。
希望不吝指教!谢谢!
wd 回复于:2004-06-17 09:48:15
test,test2设置到一个组,然后chmod /dir目录775,然后
test,test2都对目录/dir/11和/dir/22有写权限了
如果想分开,可以用
MKD / XMKD 创建目录
RNFR / RNTO 改名
DELE 删除
RMD / XRMD 移动
RETR / STOR 下载/上传
差不多了吧
可以来这里看看
http://www.proftpd.org/docs/directives/linked/config_ref_Limit.html
smgxnet 回复于:2004-06-17 10:41:39
[quote:d79831187a="wd"]test,test2设置到一个组,然后chmod /dir目录775,然后
test,test2都对目录/dir/11和/dir/22有写权限了
如果想分开,可以用
MKD / XMKD 创建目录
RNFR / RNTO 改名
DELE 删除
RMD / XRMD 移动
RETR / STOR 下..........[/quote:d79831187a]
感谢wd!我有点笨。呵呵!
能否具体告知步骤呢??
wd 回复于:2004-06-17 11:18:53
不能。呵呵
dslz 回复于:2004-07-08 11:50:02
我为什么在执行这个命令时提示找不到目录????
chkconfig --add profptd
service proftpd start
那现在我要怎样才能启动呀????
dslz 回复于:2004-07-10 10:17:20
???
opem 回复于:2004-09-13 17:31:39
[quote:5665bbca0e="daminggege"]楼主,能否清楚的解释一下:把false换成nologin还是不能访问[/quote:5665bbca0e]
在配置文件中加上:
RequireValidShell off
opem 回复于:2004-09-13 17:34:18
[quote:252f870ff5="dslz"]我为什么在执行这个命令时提示找不到目录????
chkconfig --add profptd
service proftpd start
那现在我要怎样才能启动呀????[/quote:252f870ff5]
楼主把proftpd误写成了profptd.这两句没有别的问题,执行完最后一句就能启动了
xcarb 回复于:2004-09-19 11:39:58
[root@localhost proftpd-1.2.9]# service proftpd restart
/etc/init.d/proftpd: line 1: tartup: command not found
/etc/init.d/proftpd: line 1: tartup: command not found
Shutting down proftpd: [ 确定 ]
/etc/init.d/proftpd: line 1: tartup: command not found
Starting proftpd: [ 确定 ]
出现这种情况怎么解决
?
opem 回复于:2004-09-21 10:38:15
[quote:b0bc293da6="xcarb"]]
出现这种情况怎么解决
?[/quote:b0bc293da6]
我估计是你的proftpd中第一行"# Startup script for ProFTPD"漏掉了"# S"才会出现系统找不到tartup命令的错误提示,查查看,不行把proftpd贴出来.
wd 回复于:2004-10-28 08:48:09
我最近用的一个proftpd的配置文件,只允许ph用户登陆,ph用户在/var/ftp/upload目录下可以上传。
[code:1:46fab269bb]
ServerName "Test ftp server..."
ServerType standalone
DefaultServer on
Port 21
Umask 022
MaxInstances 30
User ph
Group ph
UseReverseDNS off
IdentLookups off
MaxLoginAttempts 3
MaxClientsPerHost 2
MaxClients 20
DirFakeUser On ftp
DirFakeGroup On ftp
DeferWelcome On
SystemLog /var/log/proftpd.log
ServerIdent off
DefaultRoot ~ ph,ph
Order allow,deny
DenyUser !ph
AllowOverwrite on
AllowStoreRestart on
# AllowForeignAddress on
DenyUser ph
AllowUser ph
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/3383/showart_27516.html |
|