fedora10配置ftp服务器

简介:     fedora10配置ftp服务器并允许C#客户端通过匿名用户远程登录。     这个东西说简单也简单,但你要不是清楚相应的操作步骤乱来,那肯定是比登天还难的。 一、安装与配置方法     查询系统中是否安装了vsftpd,可以用命令:rpm -qa | grep vsftpd(找到以后我也不知道有啥用,还是要用rpm包重新装) 安装vsftpd的命令:rpm -ivh vsftpd*.rpm     费了一天时间才解决了一个小小的问题,还没有完全搞懂,先把明白的记录一下。

    fedora10配置ftp服务器并允许C#客户端通过匿名用户远程登录。
    这个东西说简单也简单,但你要不是清楚相应的操作步骤乱来,那肯定是比登天还难的。

一、安装与配置方法

    查询系统中是否安装了vsftpd,可以用命令:rpm -qa | grep vsftpd(找到以后我也不知道有啥用,还是要用rpm包重新装)

安装vsftpd的命令:rpm -ivh vsftpd*.rpm

    费了一天时间才解决了一个小小的问题,还没有完全搞懂,先把明白的记录一下。(http://linux.chinaunix.net/techdoc/system/2009/02/09/1061530.shtml)

启动vsftpd的命令式:service vsftpd start

关闭防火墙的命令:service iptables stop

关闭selinux的命令,我在网上查了,但是不好使。所以只能使用下面step 3的方法。想要启用vsftpd,上面三步都必须做。

    让匿名登录者anonymous可以上传文件,可参考以下步骤:

Step1. 修改 /etc/vsftpd/vsftpd.conf


  1. anonymous_enable=YES
  2. anon_upload_enable=NO
  3. 改为
  4. anonymous_enable=YES # =确定这行为YES
  5. anon_upload_enable=YES # 将这行的NO改为YES即可
  6. anon_mkdir_write_enable=YES # 若加上这行,则匿名登录者可新增目录


Step2. 修改/var/ftp/pub/的目录权限
执行以下命令:

  1. chmod -R 777 /var/ftp/pub/


image

Step3. 关闭selinux(我就是因为这个没关,花了一天才把东西传到ftp上)
在/etc/selinux/config 配置文件如下;

  1. /etc/selinux/config
  2. # This file controls the state of SELinux on the system.
  3. # SELINUX= can take one of these three values:
  4. # enforcing - SELinux security policy is enforced.
  5. # permissive - SELinux prints warnings instead of enforcing.
  6. # disabled - SELinux is fully disabled.
  7. SELINUX=Disabled #这样就把SELINUX服务器关掉了,请重新启动系统;
  8. # SELINUXTYPE= type of policy in use. Possible values are:
  9. # targeted - Only targeted network daemons are protected.
  10. # strict - Full SELinux protection.
  11. SELINUXTYPE=targeted

客户端登陆ftp服务器,windows下用dos登陆,或linux命令行登陆,采用ftp ip address的方式。登陆后的操作和查看文件系统的命令相同。


 

二、各个终端登录FTP服务器的方式

1、网页版登录方式:

ftp://192.168.18.8/

image

2、Windows 命令行 DOS登录

开始->运行->ftp

>open 192.168.18.8

[user]=anonymous

[password]=(empty)

 image

 

3、linux终端登录FTP服务器的命令:

# ftp 192.168.18.8

[user]=anonymous

[pass]=(empty)

image

 

三、附录文件

    另外,附上一个已经配置好的允许客户端以匿名登录的vsftpd.conf文件,该文件位于 /etc/vsftpd目录 。


  1. # Example config file /etc/vsftpd.conf
  2. #
  3. # The default compiled in settings are fairly paranoid. This sample file
  4. # loosens things up a bit, to make the ftp daemon more usable.
  5. # Please see vsftpd.conf.5 for all compiled in defaults.
  6. #
  7. # READ THIS: This example file is NOT an exhaustive list of vsftpd options.
  8. # Please read the vsftpd.conf.5 manual page to get a full idea of vsftpd's
  9. # capabilities.
  10. #
  11. # Allow anonymous FTP? (Beware - allowed by default if you comment this out).
  12. anonymous_enable=YES
  13. #
  14. # Uncomment this to allow local users to log in.
  15. local_enable=YES
  16. #
  17. # Uncomment this to enable any form of FTP write command.
  18. write_enable=YES
  19. #
  20. # Default umask for local users is 077. You may wish to change this to 022,
  21. # if your users expect that (022 is used by most other ftpd's)
  22. #local_umask=022
  23. #
  24. # Uncomment this to allow the anonymous FTP user to upload files. This only
  25. # has an effect if the above global write enable is activated. Also, you will
  26. # obviously need to create a directory writable by the FTP user.
  27. anon_upload_enable=YES
  28. #
  29. # Uncomment this if you want the anonymous FTP user to be able to create
  30. # new directories.
  31. anon_mkdir_write_enable=YES
  32. #
  33. # Activate directory messages - messages given to remote users when they
  34. # go into a certain directory.
  35. dirmessage_enable=YES
  36. #
  37. # Activate logging of uploads/downloads.
  38. xferlog_enable=YES
  39. #
  40. # Make sure PORT transfer connections originate from port 20 (ftp-data).
  41. connect_from_port_20=YES
  42. #
  43. # If you want, you can arrange for uploaded anonymous files to be owned by
  44. # a different user. Using "root" for uploaded files is not
  45. #
  46. chown_uploads=YES
  47. chown_username=ftp
  48. #
  49. # You may override where the log file goes if you like. The default is shown
  50. # below.
  51. xferlog_file=/var/log/vsftpd.log
  52. #
  53. # If you want, you can have your log file in standard ftpd xferlog format
  54. xferlog_std_format=YES
  55. #
  56. # You may change the default value for timing out an idle session.
  57. #idle_session_timeout=600
  58. #
  59. # You may change the default value for timing out a data connection.
  60. #data_connection_timeout=120
  61. #
  62. # It is recommended that you define on your system a unique user which the
  63. # ftp server can use as a totally isolated and unprivileged user.
  64. nopriv_user=ftp
  65. #
  66. # Enable this and the server will recognise asynchronous ABOR requests. Not
  67. # recommended for security (the code is non-trivial). Not enabling it,
  68. # however, may confuse older FTP clients.
  69. async_abor_enable=YES
  70. #
  71. # By default the server will pretend to allow ASCII mode but in fact ignore
  72. # the request. Turn on the below options to have the server actually do ASCII
  73. # mangling on files when in ASCII mode.
  74. # Beware that on some FTP servers, ASCII support allows a denial of service
  75. # attack (DoS) via the command "SIZE /big/file" in ASCII mode. vsftpd
  76. # predicted this attack and has always been safe, reporting the size of the
  77. # raw file.
  78. # ASCII mangling is a horrible feature of the protocol.
  79. ascii_upload_enable=YES
  80. ascii_download_enable=YES
  81. #
  82. # You may fully customise the login banner string:
  83. ftpd_banner=Welcome to blah FTP service.
  84. #
  85. # You may specify a file of disallowed anonymous e-mail addresses. Apparently
  86. # useful for combatting certain DoS attacks.
  87. #deny_email_enable=YES
  88. # (default follows)
  89. #banned_email_file=/etc/vsftpd.banned_emails
  90. #
  91. # You may specify an explicit list of local users to chroot() to their home
  92. # directory. If chroot_local_user is YES, then this list becomes a list of
  93. # users to NOT chroot().
  94. #chroot_list_enable=YES
  95. # (default follows)
  96. #chroot_list_file=/etc/vsftpd.chroot_list
  97. #
  98. # You may activate the "-R" option to the builtin ls. This is disabled by
  99. # default to avoid remote users being able to cause excessive I/O on large
  100. # sites. However, some broken FTP clients such as "ncftp" and "mirror" assume
  101. # the presence of the "-R" option, so there is a strong case for enabling it.
  102. ls_recurse_enable=YES
  103. listen=YES
  104. listen_port=21
  105. anon_other_write_enable=YES


参考并修改博客:

http://www.cnblogs.com/songQQ/archive/2009/07/12/1522010.html

相关文章
|
5天前
|
存储 机器学习/深度学习 人工智能
阿里云服务器配置2核4G/8核16G价格对比,最新收费标准及热门实例选型策略参考
在阿里云服务器的可选配置中,2核4G、4核8G以及8核16G是多数用户选择较多的配置,2核4G配置经济型e实例按小时计费低至0.225元,选2核4G+5M带宽目前年付特惠价只要199元,续费还不用涨价!4核8G配置年付活动价955.58元1年,8核16G配置按量每小时0.9元起,按年购买选择计算型c8y实例活动价格为3815.03元/1年。本文将带你深度拆解三大配置的收费标准、活动价格及选型策略,以供参考。
|
12天前
|
弹性计算 ice
阿里云4核8G云服务器配置价格:热门ECS实例及CPU处理器型号说明
阿里云2025年4核8G服务器配置价格汇总,涵盖经济型e实例、计算型c9i等热门ECS实例,CPU含Intel Xeon及AMD EPYC系列,月费159元起,年付低至1578元,按小时计费0.45元起,实际购买享折扣优惠。
169 1
|
1月前
|
存储 人工智能 容灾
阿里云服务器2核8G、4核16G、8核32G配置热门实例性能对比与场景化选型指南
2核8G/4核16G/8核32G配置的阿里云服务器在阿里云活动中目前有经济型e、通用算力型u1、通用型g7、通用型g8y和通用型g9i五种实例可选,目前2核8G配置选择u1实例活动价格652.32元1年起,4核16G月付选择经济型e实例最低89元1个月,8核32G配置160元1个月起,本文将为大家解析经济型e、通用算力型u1、通用型g7及通用型g8y实例,帮助用户根据自身需求合理选择最适合的实例规格和配置。
|
1月前
|
存储 运维 安全
阿里云服务器2核4G与4核8G配置解析:实例规格、价格及选择指南
阿里云服务器2核4G和4核8G配置凭借其均衡的性能与性价比,成为中小企业及开发者群体的热门选择。通用算力型u1实例2核4G5M带宽80G ESSD Entry云盘特惠价199元1年,个人用户最低531.79元1年,4核8G配置价格最低的是通用算力型u1实例,活动价格为955.58元1年起,除此之外,还有计算型c7、c9i、c8y等计算型实例有2核4G与4核8G配置可选。具体配置还需要看想要购买的云服务器实例规格和配置及带宽大小。本文将结合2025年最新活动价格,深度解析阿里云服务器2核4G与4核8G配置的实例规格、适用场景及选择策略,以供参考。
|
1月前
|
机器学习/深度学习 存储 前端开发
阿里云服务器8核16G配置详解:热门实例规格、价格与选购指南
阿里云服务器8核16G配置,这样的配置能够满足大多数中小型网站、Web前端服务器以及计算密集型任务的需求。根据最新的收费标准及活动价格来看,云服务器8核16G配置收费标准最低的是经济型e实例,按量收费标准0.9元/小时,如果是需要年付的话,目前选择计算型c8y实例的活动价格为为2861.27元/1年起。本文为大家介绍8核16G配置的几款主要热门实例规格各自的性能与收费标准价格情况,以供选购参考。
|
1月前
|
存储 弹性计算 固态存储
如何给轻量服务器升级套餐配置?附上云服务器配置攻略
本文介绍了阿里云轻量应用服务器升级配置的流程及注意事项,并提供云服务器选型攻略。内容涵盖升级前的数据备份、操作步骤、系统盘扩容及机房限制等,同时结合业务类型、访问量、带宽、存储等因素,指导用户合理选择ECS实例规格与配置,助您高效稳定部署应用。
|
9天前
|
存储 弹性计算 网络协议
超详细的阿里云服务器购买流程,ECS自定义购买配置教程
本文详细图解阿里云ECS服务器自定义购买全流程,涵盖付费模式、地域选择、网络配置、实例规格、镜像、存储、安全组及登录设置等核心步骤,助您轻松掌握专业级云服务器搭建方法。
|
12天前
|
弹性计算
阿里云ECS云服务器8核16G配置收费价格,多种ECS实例CPU及费用清单
阿里云8核16G云服务器价格因实例类型而异。计算型c9i约743元/月,一年6450元(7折);通用算力型u1仅673元/月,一年4225元(5.1折)。实际价格享时长折扣,详情见ECS官网。
|
20天前
|
弹性计算 Windows
阿里云香港服务器收费价格:香港ECS和轻量应用服务器配置介绍
2025年阿里云香港服务器优惠汇总:ECS 2核4G+5M带宽仅199元/年;轻量服务器30M带宽24元/月起,200M峰值带宽25元/月起。轻量性价比高,适合个人及中小企业建站、跨境业务,具体配置价格详见官方活动页。
325 1
|
1月前
|
Ubuntu 安全 应用服务中间件
详细指南:配置Nginx服务器在Ubuntu平台上
以上步骤涵盖了基本流程:从软件包管理器获取 Ngnix, 设置系统服务, 调整UFW规则, 创建并激活服务器块(也称作虚拟主机), 并进行了初步优化与加固措施。这些操作都是建立在命令行界面上,并假设用户具有必要权限(通常是root用户)来执行这些命令。每个操作都有其特定原因:例如,设置开机启动确保了即使重启后也能自动运行 Ngnix;而编辑server block则定义了如何处理进入特定域名请求等等。
206 18

热门文章

最新文章