站长搜索提供的有关服务器系统的资讯信息! 网站监控 服务器监控 SEO监控 cp /usr/lib/straddr.so.2 ${ftphome}/usr/lib rm -f ${ftphome}/usr/lib/straddr.so ln -s ./straddr.so.2 ${ftphome}/usr/lib/straddr.so cp /etc/passwd /etc/group /etc/netconfig ${ftphome}/etc chmod 555 ${ftphome}/usr/lib/* chmod 444 ${ftphome}/etc/* chown root ${ftphome}/usr/lib ${ftphome}/etc chmod 555 ${ftphome}/usr/lib ${ftphome}/etc if [ ! -d ${ftphome}/dev ]; then mkdir -p ${ftphome}/dev fi p
站长搜索提供的有关服务器系统的资讯信息! 网站监控 服务器监控 SEO监控
cp /usr/lib/straddr.so.2 ${ftphome}/usr/lib
rm -f ${ftphome}/usr/lib/straddr.so
ln -s ./straddr.so.2 ${ftphome}/usr/lib/straddr.so
cp /etc/passwd /etc/group /etc/netconfig ${ftphome}/etc
chmod 555 ${ftphome}/usr/lib/*
chmod 444 ${ftphome}/etc/*
chown root ${ftphome}/usr/lib ${ftphome}/etc
chmod 555 ${ftphome}/usr/lib ${ftphome}/etc
if [ ! -d ${ftphome}/dev ]; then
mkdir -p ${ftphome}/dev
fi
prefix="/devices/pseudo/mm@0:"
for device in zero
do
line=`ls -l ${prefix}${device} | sed -e 's/,//'`
major=`echo $line | awk '{print $5}'`
minor=`echo $line | awk '{print $6}'`
rm -f ${ftphome}/dev/${device}
mknod ${ftphome}/dev/${device} c ${major} ${minor}
done
prefix="/devices/pseudo/clone@0:"
for device in tcp udp ticotsord
do
line=`ls -l ${prefix}${device} | sed -e 's/,//'`
major=`echo $line | awk '{print $5}'`
minor=`echo $line | awk '{print $6}'`
rm -f ${ftphome}/dev/${device}
mknod ${ftphome}/dev/${device} c ${major} ${minor}
done
chmod 666 ${ftphome}/dev/*
chown root ${ftphome}/dev
chmod 555 ${ftphome}/dev
if [ ! -d ${ftphome}/pub ]; then
mkdir -p ${ftphome}/pub
fi
chown ftp ${ftphome}/pub
chmod 777 ${ftphome}/pub
3. 编辑/etc/passwd和/etc/shadow文件
设置匿名FTP帐号,按下面方法分别对/etc/passwd和/etc/shadow两个文件中增加如下数据项:
(1)在/etc/passwd文件中增加
ftp:x:30000:30000:Anonymous FTP:/home/ftp:/nosuchshell
(2)在/etc/shadow文件中增加
ftp:NP:6445::::::
4. 运行setup程序
在运行setup程序之前,将该文件设置成执行文件
#chmod +x setup
运行setup程序 #setup /home/ftp
以上步骤就完成了FTP服务器的建立,即可使用FTP服务器,可以用如explorer、netscape navigator等浏览器对FTP服务器进行访问,进行下载和上载文件操作,使用非常方便。
本篇文章来源于 中国建站之家 原文链接:http://www.jz123.cn/Article/13/150/2005/200507204541.html
声明:本文内容来源自网络,文字、图片等素材版权属于原作者,平台转载素材出于传递更多信息,文章内容仅供参考与学习,切勿作为商业目的使用。如果侵害了您的合法权益,请您及时与我们联系,我们会在第一时间进行处理!我们尊重版权,也致力于保护版权,站搜网感谢您的分享!