岁月联盟 · 中国技术网 本站主页 | 安全认证 | 用户服务 | 技术论坛
新闻快报 | 新手学堂 | 黑客特区 | 程序语言 | 数 据 库 | 防 火 墙 | 路由交换 | 系统集成 | 服 务 器 | 存储备份 | 考试认证
Windows | Linux | Java | 协议分析 | 问题解答 | 进程大全 | 网页设计 | 多 媒 体 | 图库资料 | 软件下载 | 站内下载
  您现在的位置: 岁月联盟 >> Linux频道 >> 新手入门 >> 软件使用 >> Linux频道正文
Ubuntu Linux 7.04系统安装并使用Proftp
作者:未知 文章来源:本站整理 点击数: 更新时间:2007-12-18 15:16:54

  1- 使用下面的命令安装proftpd:

  Code:

  sudo apt-get install proftpd

  2- 在etc/shells 加入如下代码 (sudo gedit /etc/shells to open the file)(译注:命令行模式下sudo vi /etc/shells) :

  Code:

  /bin/false

  新建一个 /home/FTP-shared 目录 :

  Code:

  cd /home

  sudo mkdir FTP-shared

  创建一个只能用来读取ftp的用户userftp. 这个用户不需要有效的shell(更安全) ,所以选择 /bin/false shell 给 userftp , /home/FTP-shared 作为主目录。

  为了是这部分更清楚,我给取此操作的命令行:

  Code:

  sudo useradd userftp -p your_password -d /home/FTP-shared -s /bin/false

  在FTP-shared 目录下新建一个download和一个upload 目录:

  Code:

  cd /home/FTP-shared/

  sudo mkdir download

  sudo mkdir upload

  现在我们来给它们设置相应的权限:

  Code:

  cd /home

  sudo chmod 755 FTP-shared

  cd FTP-shared

  sudo chmod 755 download

  sudo chmod 777 upload

  3- 好了,现在进入proftpd的配置文件:

  Code:

  sudo gedit /etc/proftpd/proftpd.conf //特别注意路径,网上以前给的是错的

  当然你可以按你的需要编辑你自己的proftpd.conf:

  Code:

  # To really apply changes reload proftpd after modifications.

  AllowOverwrite on

  AuthAliasOnly on

  # Choose here the user alias you want !!!!

  UserAlias sauron userftp

  ServerName "ChezFrodon"

  ServerType standalone

  DeferWelcome on

  MultilineRFC2228 on

  DefaultServer on

  ShowSymlinks off

  TimeoutNoTransfer 600

  TimeoutStalled 100

  TimeoutIdle 2200

  DisplayFirstChdir .message

  ListOptions "-l"

  RequireValidShell off

  TimeoutLogin 20

  RootLogin off

  # It's better for debug to create log files ;-)

  ExtendedLog /var/log/ftp.log

  TransferLog /var/log/xferlog

  SystemLog /var/log/syslog.log

  #DenyFilter \*.*/

  # I don't choose to use /etc/ftpusers file (set inside the users you want to ban, not useful for me)

[1] [2] 下一页  

  UseFtpUsers off

  # Allow to restart a download

  AllowStoreRestart on

  # Port 21 is the standard FTP port, so don't use it for security reasons (choose here the port you want)

  Port 1980

  # To prevent DoS attacks, set the maximum number of child processes

  # to 30. If you need to allow more than 30 concurrent connections

  # at once, simply increase this value. Note that this ONLY works

  # in standalone mode, in inetd mode you should use an inetd server

  # that allows you to limit maximum number of processes per service

  # (such as xinetd)

  MaxInstances 8

  # Set the user and group that the server normally runs at.

  User nobody

  Group nogroup

  # Umask 022 is a good standard umask to prevent new files and dirs

  # (second parm) from being group and world writable.

  Umask 022 022

  PersistentPasswd off

  MaxClients 8

  MaxClientsPerHost 8

  MaxClientsPerUser 8

  MaxHostsPerUser 8

  # Display a message after a successful login

  AccessGrantMsg "welcome !!!"

  # This messa

[1] [2] 下一页


  • 上一个Linux频道:
  • 下一个Linux频道:
  •  
    热门文章
    推荐文章
    关于我们 | 发展历程 | 网站地图 | 广告服务 | 招贤纳士 | 战略合作 | 友情链接 | 著作声明 | 联系我们
    Copyright © 2002-2007 SYUE All rights reserved.
    E_mail:WebSyue@163.Com 皖ICP备05004589号
    未经授权禁止转载、摘编、复制或建立镜像.如有违反,追究法律责任.
    bet365 传奇服务端 魔域私服 劲舞私服 传奇世界私服 bet365 传世私服 传奇世界私服