[分享]菜鸟简单建立FTP的方法

Web、Mail、Ftp、DNS、Proxy、VPN、Samba、LDAP 等基础网络服务
回复
爱上那只猪
帖子: 263
注册时间: 2008-07-11 16:23

Re: [分享]菜鸟简单建立FTP的方法

#136

帖子 爱上那只猪 » 2009-07-25 10:55

如果你只是想共享文件.
smba 绝对能满足..做ftp 有点....
sealsp
帖子: 37
注册时间: 2009-05-07 20:11

Re: [分享]菜鸟简单建立FTP的方法

#137

帖子 sealsp » 2009-08-02 13:18

好帖要MARK·~
zhaoyao8727
帖子: 1
注册时间: 2007-09-04 15:29

Re: [分享]菜鸟简单建立FTP的方法

#138

帖子 zhaoyao8727 » 2009-09-20 9:46

谢谢楼主分享,哈哈,我试了好几次,终于成功了
头像
kevin.zw
帖子: 9
注册时间: 2009-09-11 13:14

Re: [分享]菜鸟简单建立FTP的方法

#139

帖子 kevin.zw » 2009-09-24 13:39

谢谢,先留个爪印!!!
头像
bbeikke
帖子: 880
注册时间: 2008-10-14 21:54

Re: [分享]菜鸟简单建立FTP的方法

#140

帖子 bbeikke » 2009-10-12 21:59

下次也去建过简单的ftp试试。。。
地狱可以想象,天堂却无法描述。
头像
linuxunion
帖子: 72
注册时间: 2006-02-17 23:30

Re: [分享]菜鸟简单建立FTP的方法

#141

帖子 linuxunion » 2009-10-14 20:20

感觉还是没有samba来的简单快捷
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re: [分享]菜鸟简单建立FTP的方法

#142

帖子 haoyihuan » 2009-10-21 12:10

我按照搂住的指示安装,结果条出来:
500 OOPS: child died
下面我把我的vsftp.conf那出来给大家看下(花了我一个上午的时间来翻译):
# Example config file /etc/vsftpd.conf
# 此配置文件位置:/etc/vsftpd.conf
#
# The default compiled in settings are fairly paranoid. This sample file
# loosens things up a bit, to make the ftp daemon more usable.
# Please see vsftpd.conf.5 for all compiled in defaults.
# 默认的编译相当偏执。
# 如果想使FTP服务程序便于使用,你可以让此势力文件松开一点东西。
# 查看所有默认编译,请看考vsftpd.conf.5配置文件。
#
# READ THIS: This example file is NOT an exhaustive list of vsftpd options.
# Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
# capabilities.
# 此示例文件并不包含vsftpd选项的扩展清单。
# 请参考vsftpd.conf.5帮助手册以获得vsftpd的全面功能设置。
#
# Run standalone? vsftpd can run either from an inetd or as a standalone
# daemon started from an initscript.
# 独立运行?vsftpd既可以作为从属进程运行,也可以作为独立进程从运行——启动脚本
listen=YES
#
# Run standalone with IPv6?
# Like the listen parameter, except vsftpd will listen on an IPv6 socket
# instead of an IPv4 one. This parameter and the listen parameter are mutually
# exclusive.
# 利用IP6独立运行?
# 像监听参数一样,vsftpd除了能够监听一个IPv6端口,用来代替一个IPv4端口。
# 此参数和监听参数是互相排斥的。
#listen_ipv6=YES
#
# Allow anonymous FTP? (Beware - allowed by default if you comment this out).
# 允许匿名登录FTP?(注意——如果你把这一行作为批注默认情况下是允许)
anonymous_enable=NO
#
# Uncomment this to allow local users to log in.
# 取消本行批注,就可以允许本地用户登录。
local_enable=YES
#
# Uncomment this to enable any form of FTP write command.
# 取消本注释,允许FTP任何形式的"可写"操作
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)
# 默认的对本地用户的开放权限是077。
# 如果你的用户需要,你可以更改此权限为022(大多数其他ftpd服务器都启用022)
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.
# 取消本注释可以允许匿名FTP用户上传文件。只有在全局“可写”环境生效,此功能才激活。
# 因此,你需要建立一个可写的用户目录。
# anon_upload_enable=YES
#
# Uncomment this if you want the anonymous FTP user to be able to create
# new directories.
# 取消本注释,可以允许匿名FTP用户创建目录。
# 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).
# 确保FTP的数据传输端口来自20端口的连接。
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!
# 如果您愿意,您可以安排匿名上传文件,由不同的用户拥有。
# 注意:不推荐“root”用户上传文件。
chown_uploads=YES
chown_username=haoyihuan
#
# 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
# 如果你愿意,你可以生成标准ftpd日志格式的日志文件。
#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.
# 我们建议你在你的系统定义一个ftp服务器中唯一的、完全独立的、未经授权的用户
nopriv_user=ingcai
#
# 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.
# 取消本注释,服务器将承认异步ABOR命令请求。
# 为了安全,不建议使用(代码可能是不规范的)。
# 但是,让它失效,老的FTP客户端可能会混淆。
#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 on some FTP servers, ASCII support allows a denial of service
# attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
# predicted this attack and has always been safe, reporting the size of the
# raw file.
# ASCII mangling is a horrible feature of the protocol.
# 默认情况下,服务器会伪装成允许ASCII代码,事实上就是忽略相关请求。
# 开启下面的选项,会让服务器当有ASCII代码时,真正在文件里面压延处理相关ASCII代码。
# 请注意:在一些FTP服务器,ASCII的支持会招来ASCII模式下(DoS——拒绝服务)攻击,主要是通过命令:“SIZE/big/file”
# sftpd会预测本次攻击,保持一直安全,并报告原始文件的大小。
#ascii_upload_enable=YES
ascii_download_enable=YES
#
# You may fully customise the login banner string:
# 你可以完全自定义登录画面欢迎语:
ftpd_banner=欢迎登录Ingcai FTP服务器.
#
# 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=/home/ftp/vsftpd.banned_emails
#
# You may restrict local users to their home directories. See the FAQ for
# the possible risks in this before using chroot_local_user or
# chroot_list_enable below.
# 你可以限制本地用户连接他们的主目录。
# 在使用下面chroot_local_user或者chroot_list_enable之前。请查看这方面可能的风险,详情参考FAQ(常见问题,可在网上搜索)。
chroot_local_user=YES
#
# 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()到自己的目录。
# 如果启用chroot_local_user is YES,那时这个列表就成为不能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的内置选项"-R"。这在默认情况下是禁用的,以避免大型网站远程用户引起过量I/O流量。
# 但是,一些不成熟的FTP客户端(如:ncftp、mirror)假设存在"-R"选项。
# 所以强烈建议开启这个有利的设置。
ls_recurse_enable=YES
#
#
# Debian customization
# Debian定制:
#
# Some of vsftpd's settings don't fit the Debian filesystem layout by
# default. These settings are more Debian-friendly.
# 一些vsftpd的设置不符合Debian默认的文件系统布局。
# 但是,这些设置会更适合Debian。
#
# This option should be the name of a directory which is empty. Also, the
# directory should not be writable by the ftp user. This directory is used
# as a secure chroot() jail at times vsftpd does not require filesystem
# access.
# 此目录的连接名字必须是空的。此外,该目录对ftp用户不具有"可写"的权限。
# 此目录用来安全登录chroot()文件夹,同时vsftpd不需要存取文件系统。
secure_chroot_dir=/var/run/vsftpd
#
# This string is the name of the PAM service vsftpd will use.
# 该字符串将用于vsftpd中PAM服务的名称。
pam_service_name=vsftpd
#
# This option specifies the location of the RSA certificate to use for SSL
# encrypted connections.
# 此选项指定SSL加密连接的RSA证书位置。
rsa_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
# This option specifies the location of the RSA key to use for SSL
# encrypted connections.
# 此选项指定SSL加密连接的RSA密钥位置。
rsa_private_key_file=/etc/ssl/private/ssl-cert-snakeoil.key




# 自行添加的配置
# 同时允许4客户端连入,每个IP最多5个进程
max_clients=200
max_per_ip=4

#指定登录转向目录
local_root=/home/ftp
跑debian应该是有点搞头的吧。
头像
haoyihuan
帖子: 271
注册时间: 2009-06-11 13:37

Re:

#143

帖子 haoyihuan » 2009-10-22 7:09

看样子这个帖人气越来越少了

yl9931 写了:楼主为什么我按你说的做了以后登录不了啊。。。。

提示说:500 oops childdied

提示登录失败啊。。。。这是怎么办????
我也遇到同样的问题,激活一个帐户后就可以了(不知道是激活还是新建帐户)。
我先激活了另外一个帐户后,刷新就可以浏览了。
:em06
跑debian应该是有点搞头的吧。
snowinmay
帖子: 29
注册时间: 2009-10-28 20:00

Re: [分享]菜鸟简单建立FTP的方法

#144

帖子 snowinmay » 2009-10-30 16:07

请问下:FTP建好了之后怎么往上面传文件阿?
vinkey
帖子: 19
注册时间: 2009-06-14 15:45

Re: [分享]菜鸟简单建立FTP的方法

#145

帖子 vinkey » 2009-11-10 13:56

楼主不错哦 :em09
song202
帖子: 6
注册时间: 2009-11-14 11:40

Re: [分享]菜鸟简单建立FTP的方法

#146

帖子 song202 » 2009-11-14 12:13

学习了 待会试试
头像
速腾1994
论坛版主
帖子: 17379
注册时间: 2008-11-01 20:43
系统: Arch+gnome

Re: [分享]菜鸟简单建立FTP的方法

#147

帖子 速腾1994 » 2009-11-19 13:35

xiehuoli,哈哈^_^
zrbin
帖子: 3
注册时间: 2008-12-20 21:43

Re: [分享]菜鸟简单建立FTP的方法

#148

帖子 zrbin » 2009-11-21 20:37

为什么我把本地用户ftpuser(属于ftp组) 的shell设为/bin/false了,还可以用ftpuser进行桌面的登录,虽然不能使用ssh和telnet登录,但是可直接通过桌面登录,是不是很不安全
zzyy
帖子: 20
注册时间: 2009-08-19 15:44

Re: [分享]菜鸟简单建立FTP的方法

#149

帖子 zzyy » 2009-11-29 22:09

按着楼主的方法,home目录下没有生成ftp文件夹,运行命令sudo useradd -m ftp,提示useradd: user 'ftp' already exists,但home目录下确实没ftp文件夹,不知道问题出那里了。帮帮忙,谢谢!
jlp10735
帖子: 1
注册时间: 2009-12-04 23:27

Re: [分享]菜鸟简单建立FTP的方法

#150

帖子 jlp10735 » 2009-12-04 23:54

:em01
回复