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

相关文章
|
1月前
|
存储 弹性计算 人工智能
2025年阿里云企业云服务器ECS选购与配置全攻略
本文介绍了阿里云服务器的核心配置选择方法论,涵盖算力需求分析、网络与存储设计、地域部署策略三大维度。针对不同业务场景,如初创企业官网和AI模型训练平台,提供了具体配置方案。同时,详细讲解了购买操作指南及长期运维优化建议,帮助用户快速实现业务上云并确保高效运行。访问阿里云官方资源聚合平台可获取更多最新产品动态和技术支持。
|
7天前
|
负载均衡 JavaScript Linux
做网站如何选择云服务器?(一)配置篇
选择服务器需考虑网站规模、技术需求和地理位置。个人博客适合基础配置,企业官网需4核CPU、8GB内存,电商平台则需更高配置并配备负载均衡。技术上,展示型网站用PHP+MySQL,互动社区需Node.js/Python环境,视频类网站要大带宽。地理位置影响服务器选择,国内用户选腾讯云/阿里云,海外用户选AWS等。主流服务器类型包括虚拟主机(入门级)、云服务器(推荐)和物理服务器(高端需求)。云服务商普遍提供免费试用,便于评估性能。
29 1
|
12天前
|
弹性计算
【已解决】Matomo本地SMTP配置可以发邮件,但部署到阿里云ECS就发不了邮件
在阿里云ECS上使用Matomo和PHPMailer发送邮件时遇到问题,邮件无法发出且接口调用Pending。经过排查,发现是ECS安全组未开放25/465端口,导致SMTP请求无法正常通信。解决方法为在安全组中配置并开放25/465端口,从而恢复邮件发送功能。
|
14天前
|
弹性计算 运维 Ubuntu
在阿里云ECS云服务器上安装、配置及高效使用Docker与Docker Compose
本文介绍了在阿里云ECS上使用Ubuntu系统安装和配置Docker及Docker Compose的详细步骤。通过这些工具,可以快速部署、弹性扩展和高效管理容器化应用,满足开发和运维需求。内容涵盖Docker的安装、镜像源配置、创建Web程序镜像以及使用Docker Compose部署WordPress等实际操作,并分享了使用体验,展示了阿里云实例的高性能和稳定性。
189 4
|
1月前
|
存储 人工智能 缓存
怎么根据自己的业务选择阿里云服务器配置大小?
本文指导如何根据业务需求精准选择阿里云服务器配置,涵盖个人轻量级至企业级、计算密集型等场景,推荐不同实例类型、存储与带宽方案,并提供成本优化策略,如包年包月节省成本、按需升级配置及选用性价比高的自研ARM架构实例。帮助用户在数字化转型中实现性能与成本的平衡。 注:以上配置与价格基于阿里云2025年官方数据,实际信息可能有所调整,请以官网实时页面为准。
|
1月前
|
人工智能 运维 监控
2025年阿里云服务器配置选择全攻略:CPU、内存、带宽与系统盘详解
在2025年,阿里云服务器以高性能、灵活扩展和稳定服务助力数字化转型,提供轻量应用服务器、通用型g8i实例等多样化配置,满足个人博客至企业级业务需求。针对不同场景(如计算密集型、内存密集型),推荐相应实例类型与带宽规划,强调成本优化策略,包括包年包月节省成本、ESSD云盘选择及地域部署建议。文中还提及安全设置、监控备份的重要性,并指出未来可关注第九代实例g9i支持的新技术。整体而言,阿里云致力于帮助用户实现性能与成本的最优平衡。 以上简介共计238个字符。
|
27天前
|
存储 安全 网络安全
阿里云国际站:阿里云服务器端口配置
悟空云@CloudWuKong阿里云是全球领先的云计算服务提供商,为用户提供弹性计算、数据库、存储、网络安全等一系列云计算服务。在使用阿里云服务器时,合理配置端口非常重要,可以提高服务器安全性和稳定性。
|
1月前
|
存储 人工智能 并行计算
2025年阿里云弹性裸金属服务器架构解析与资源配置方案
🚀 核心特性与技术创新:提供100%物理机性能输出,支持NVIDIA A100/V100 GPU直通,无虚拟化层损耗。网络与存储优化,400万PPS吞吐量,ESSD云盘IOPS达100万,RDMA延迟<5μs。全球部署覆盖华北、华东、华南及海外节点,支持跨地域负载均衡。典型应用场景包括AI训练、科学计算等,支持分布式训练和并行计算框架。弹性裸金属服务器+OSS存储+高速网络综合部署,满足高性能计算需求。
|
1月前
|
存储 人工智能 监控
新手小白购买阿里云服务器省钱策略、配置选型与注意事项
针对初次使用阿里云服务器的用户,本文提供系统化的指导方案以优化成本并满足业务需求。首先介绍配置选型,包括实例类型(通用型、计算型、内存型)与基础配置建议;其次阐述省钱策略,如企业认证、合理选择计费模式及批量购买;最后提醒注意事项,涵盖带宽存储规划、地域网络优化及安全管理。新手可通过明确需求、选择配置、优化购买和持续监控四步快速上手,实现高效稳定的云端部署。 注:推荐配置基于2025年阿里云产品体系,具体信息请参考官网。
|
7天前
|
Windows
Windows系统云服务器配置多用户登录
本教程介绍了在Windows云服务器上配置远程桌面服务的详细步骤,包括安装桌面会话主机和远程桌面授权、允许多用户远程连接以及配置新用户并加入远程桌面用户组。通过添加角色和功能、设置组策略以及管理用户权限,实现多用户同时登录和远程访问。按照指引操作,可顺利完成服务器的远程访问配置,提升管理和使用效率。
25 0