红帽linux proftp,proftp搭建linux的ftp服务

部署ftp服务器

首先建立下载目录

mkdir  -p /home/down

tar -zxvf proftpd-1.3.2.tar.gz  #解压源码

cd proftpd-1.3.2   #进入源码包

./configure --prefix=/home/ftp/proftpd  #编译安装路径

make && make install  #编译二进制码和安装

cp contrib/dist/rpm/proftpd.init.d /etc/init.d/proftpd #【拷贝启动文件,是为了方便用service proftpd start 来启动ftp服务】

chmod o+x /etc/rc.d/init.d/proftpd #给启动脚本执行权限

vi /etc/init.d/proftpd #修改启动文件错误的路径

######################################################

#!/bin/sh

#

# Startup script for ProFTPD

#

# chkconfig: 345 85 15

# description: ProFTPD is an enhanced FTP server with \

#              a focus toward simplicity, security, and ease of configuration. \

#              It features a very Apache-like configuration syntax, \

#              and a highly customizable server infrastructure, \

#              including support for multiple 'virtual' FTP servers, \

#              anonymous FTP, and permission-based directory visibility.

# processname: proftpd

# config: /home/ftp/proftpd/etc/proftpd.conf  #路径如果不正确需要修改

#

# By: Osman Elliyasa

# $Id: proftpd.init.d,v 1.7 2002/12/07 21:50:27 jwm Exp $

# Source function library.

. /etc/rc.d/init.d/functions

if [ -f /etc/sysconfig/proftpd ]; then

. /etc/sysconfig/proftpd

fi

PATH="$PATH:/home/quacor/proftpd/sbin"  #路径不正确需要修改

#########################################################

一下是proftp.conf的配置,安装自己需求修改

#########################################################

# This is a basic ProFTPD configuration file (rename it to

# 'proftpd.conf' for actual use.  It establishes a single server

# and a single anonymous login.  It assumes that you have a user/group

# "nobody" and "ftp" for normal operation and anon.

ServerName                      "www FTP"

ServerType                      standalone

DefaultServer                   on

# Port 21 is the standard FTP port.

Port                            21    #制定端口

# Don't use IPv6 support by default.

UseIPv6                         off #关闭ip6

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

# from being group and world writable.

Umask                           002 #给上传文件权限

# 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                    30 #最大连接数

# Set the user and group under which the server will run.

User                            nobody  #指定启动用户

Group                           nobody#制定启动组

# To cause every FTP user to be "jailed" (chrooted) into their home

# directory, uncomment this line.

DefaultRoot ~ !admin#指定能访问全部服务器资源的权限

# Normally, we want files to be overwriteable.

AllowOverwrite          on  #权限设置

UseReverseDNS           off

IdentLookups            off

# Bar use of SITE CHMOD by default

DenyAll

####################################################

建立ftp服务器用户最好不要给shell权限,推荐用一下命令建立用户

useradd -m  -d /down/ftp -g ftpm -s /sbin/nologin ftp123【本命令不见用户目录,制定上传下载目录,指定上传组,拒绝shell登入】

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值