[[wiki]wiki[/wiki]][/wiki]
[wiki]系统[/wiki][wiki]环境[/wiki]:red hat linuix 8.0
服务:[wiki]FTP[/wiki][wiki]服务器[/wiki]
要求:将新增的一块120G[wiki]硬盘[/wiki]以FTP形式提供给公司每个人员,以用来数据的存储,前且ftpusers这个帐号用于后台的维护
实现:
Proftp安装不在多述,实现过程如下:
首先挂载硬盘,并且达到开机自动加载的目的,硬盘文件格式为FAT32型;
修改/etc/fstab文件,可达到上述目的,在该文件下添加如下一行:
/dev/hdf1
/mnt/dosc
vfat rw,
codepage=936,iocharset=cp936
0 0
或者下面一行:
/dev/hdf1
/mnt/dosc
vfat
defaults,umask=000,iocharset=cp936
0 0
首先在服务器上添加ftpusers,接着在添加用户ftpusers ,使该用户属于ftpusers组,并设置密码;
#groupadd
ftpusers
#useradd
-g
ftpusers
ftpusers
#passwd
ftpusers
//提示输入密码
设定好以后,打开proftp的配置文件/usr/local/proftp/etc/proftpd.conf
经过修改后的proftpd.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.
Serve[wiki]RNA[/wiki]me
"hbpcc ftp server"
Server[wiki]type[/wiki]
standalone
DefaultServer
on
# Port 21 is the standard FTP port.
Port
21
# Umask 022 is
o 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 ~ ftpusers
# Normally, we want files to be overwriteable.
AllowOverwrite
on
AllowOverwrite
on
User
ftp
Group
ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias
anonymous ftp
# Limit the maximum number of anonymous logins
MaxClients
10
# We want 'welcome.msg' displayed at login, and
'.message' displayed
# in each newly chdired directory.
DisplayLogin
welcome.msg
DisplayFirstChdir
.message
# Limit WRITE everywhere in the anonymous chroot
AllowAll