您的位置:首页 > 编程语言 > PHP开发

ubuntu环境下vsftpd服务器的搭建 以几个重要问题的解决

2014-04-11 20:21 351 查看
ubuntu环境下vsftpd服务器的搭建
以及几个问题的解决
终于把ftp配置好了,可以传东西了,太不容易了!!!!
参考资料:
http://wiki.ubuntu.org.cn/Vsftpd
[分享]菜鸟简单建立FTP的方法-
查看主题•
Ubuntu中文论坛.html

windows下用FileZilla客户端登录情况
1、匿名登录





2、用户及用户密码登录,连接21号端口



home目录下的文件情况



问题一:vsftpd
服务总是启动不了,总显示vsftpd stop/waitting
图例:



原因:具体原因肯定是相关配置文件出错
解决:
在网上搜了许多,试了多种方法,关闭防火墙啊等等!
均没有效果,我就一狠心卸载了,重装,结果好了!
注意就是要把全部vsftdp的配置文件全部找出来,可以用locate或者find命令,并删除干净!再重装即可。
结果:





还有个很大的问题 会报的错误,把我快弄爆了:500 OOPS
出现这个问题就是权限出错,修改文件和相应文件夹的权限



配置文件都没怎么修改,本来还想弄高端点,有时间再弄吧。
以下是我的配置文件:
listen=YES

#

# Runstandalone with IPv6?

# Like thelisten parameter, except vsftpd will listen on an IPv6 socket

# insteadof an IPv4 one. This parameter and the listen parameter are mutually

#exclusive.

#listen_ipv6=YES

#

# Allowanonymous FTP? (Beware - allowed by default if you comment this out).

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

#

# Defaultumask for local users is 077. You may wish to change this to 022,

# if yourusers expect that (022 is used by most other ftpd's)

local_umask=022

#

#Uncomment this to allow the anonymous FTP user to upload files. Thisonly

# has aneffect 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 tocreate

# newdirectories.

anon_mkdir_write_enable=YES

#

# Activatedirectory messages - messages given to remote users when they

# go intoa certain directory.

dirmessage_enable=YES

#message_file=dirmessfile

#ftpd_banner=welcometo nick yang ftp, enjoy yourself.

#

# Ifenabled, vsftpd will display directory listings with the time

# in your local time zone. The default is to display GMT. The

# timesreturned by the MDTM FTP command are also affected by this

# option.

use_localtime=YES

#

# Activatelogging of uploads/downloads.

xferlog_enable=YES

#

# Makesure PORT transfer connections originate from port 20 (ftp-data).

connect_from_port_20=YES

#

# If youwant, you can arrange for uploaded anonymous files to be owned by

# adifferent user. Note! Using "root" for uploaded files isnot

#recommended!

#chown_uploads=YES

#chown_username=whoever

#

# You mayoverride where the log file goes if you like. The default is shown

# below.

xferlog_file=/var/log/vsftpd.log

#

# If youwant, you can have your log file in standard ftpd xferlog format.

# Notethat the default log file location is /var/log/xferlog in this case.

#xferlog_std_format=YES

#

# You maychange the default value for timing out an idle session.

#idle_session_timeout=600

#

# You maychange the default value for timing out a data connection.

#data_connection_timeout=120

#

# It isrecommended that you define on your system a unique user which the

# ftpserver can use as a totally isolated and unprivileged user.

#nopriv_user=ftpsecure

#

# Enablethis 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

#

# Bydefault the server will pretend to allow ASCII mode but in factignore

# therequest. Turn on the below options to have the server actually doASCII

# manglingon files when in ASCII mode.

# Bewarethat 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 ofthe

# rawfile.

# ASCIImangling is a horrible feature of the protocol.

#ascii_upload_enable=YES

#ascii_download_enable=YES

#

# You mayfully customise the login banner string:

#ftpd_banner=Welcometo blah FTP service.

#

# You mayspecify a file of disallowed anonymous e-mail addresses. Apparently

# usefulfor combatting certain DoS attacks.

#deny_email_enable=YES

# (defaultfollows)

#banned_email_file=/etc/vsftpd.banned_emails

#

# You mayrestrict local users to their home directories. See the FAQ for

# thepossible risks in this before using chroot_local_user or

#chroot_list_enable below.

#chroot_local_user=YES

# You mayspecify an explicit list of local users to chroot() to their home

#directory. If chroot_local_user is YES, then this list becomes a listof

# users toNOT chroot().

#(Warning! chroot'ing can be very dangerous. If using chroot, makesure that

# the userdoes not have write access to the top level directory within the

# chroot)

#chroot_local_user=YES

#chroot_list_enable=YES

# (defaultfollows)

#chroot_list_file=/etc/vsftpd.chroot_list

# You mayactivate the "-R" option to the builtin ls. This isdisabled by

# defaultto avoid remote users being able to cause excessive I/O on large

# sites.However, some broken FTP clients such as "ncftp" and"mirror" assume

# thepresence of the "-R" option, so there is a strong case forenabling it.

#ls_recurse_enable=YES

#Customization

# Some ofvsftpd's settings don't fit the filesystem layout by

# default.

# Thisoption should be the name of a directory which is empty. Also, the

#directory should not be writable by the ftp user. This directory isused

# as asecure chroot() jail at times vsftpd does not require filesystem

# access.

secure_chroot_dir=/var/run/vsftpd/empty

# Thisstring is the name of the PAM service vsftpd will use.

pam_service_name=vsftpd

#

# Thisoption specifies the location of the RSA certificate to use for SSL

#encrypted connections.

rsa_cert_file=/etc/ssl/private/vsftpd.pem

local_root=/home/ftp
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐