永发信息网

来检查一下linux的ftp配置文件!

答案:6  悬赏:10  手机版
解决时间 2021-05-09 01:33

# Example config file /etc/vsftpd/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.
#
# 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.
#
# Allow anonymous 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
#
# 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 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_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
#
# When "listen" directive is enabled, vsftpd runs in standalone mode and
# listens on IPv4 sockets. This directive cannot be used in conjunction
# with the listen_ipv6 directive.
listen=YES
#
# This directive enables listening on IPv6 sockets. To listen on IPv4 and IPv6
# sockets, you must run two copies of vsftpd whith two configuration files.
# Make sure, that one of the listen options is commented !!
#listen_ipv6=YES

pam_service_name=vsftpd
userlist_enable=NO
tcp_wrappers=YES

我明明允许了匿名访问了啊,可是用匿名用户ftp 就是登录不上去?用本地的用户就能登上去!
还有我想匿名直接在FTP上传下载文件,该怎么设置! 请直接说配置!
速度啊呀!~

最佳答案

anon_other_write_enable=(yes/no):(此语句控制对文件和文件夹的删除和重命名,默认配置文件中没有该语句,需要手动添加。)


Yes允许匿名用户对文件、文件夹有除了上传和建立文件夹之外的权限,比如对文件和文件夹的删除和重命名。
No不可以对文件和目录删除和重命名以及除了上传和建立文件夹之外的操作

anon_world_readable_only=yes/no(yes):(此语句控制匿名用户文件的下载,默认配置文件中没有,需要手动添加)
Yes则允许匿名用户下载文件(非目录)可以下载到本机阅读,不能直接在FTP服务器中打开阅读;
NO不允许匿名用户下载文件

执行一下这个命令 chown ftp /var/ftp/pub 如果不想用这个文件夹 也可以自己mkdir一个

全部回答
用户名叫:anonymous ,不是ftp
manual data logging

你可以试试这样 chown ftp /var/ftp/pub

这样不行可以设置sebool值 setsebool -P allow_ftpd_anon_write on

我建议你将selinux属性关闭,执行这样一条命令 chcon -t public_content_rw_t /var/ftp/ -R

权限问题.包括目录权限和selinux的权限.

请问:

你给了文件夹权限了么?

chmod 777 /var/ftp/pub

再一个,你用匿名帐户怎么登陆的?输入了账号是?密码是?

我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
冰天雪地转体720度裸体跪求一首歌的歌名.有点
哪个网站可以看龙珠4
谁有联想开发的国产手机JAVA模拟器的组件(MR
急!悬赏高分问题!西安那里有卖N76行货!
描写情爱诗词,关于情爱的诗句
我家网络包年的,不过申请错了网通,怎样才能
在苏州有什么好玩的地方
紧急啊谢谢解决
月经的困惑?
针掉到大海里了怎么办
杀手的影片
怎样才可以把w715的主题放进手机里?
浦江有哪些烧烤的好去处?
无业人员可以考会计证吗?
吕镇村卫生室这个地址在什么地方,我要处理点
推荐资讯
QQ空间的花藤怎么升级的?
绿色衣服配红色裤子加紫色鞋子,是不是很奇怪
手机三星W750多久会在国内上市!NC别来。
PPS看的时候画面是花的,要怎么办
上网都干什么?
问道 我想买家具的一些问题
什么样的人会免费给我充会员
Q宠大乐斗我怎么没有前三个技能啊
Q宠天天使有什么用
写意象的仿写
谁免费帮我过QQ飞车剧情任务?【包括平民难度
什么场合打领带,打领带系法全过程 怎么打领带
正方形一边上任一点到这个正方形两条对角线的
阴历怎么看 ?