`
jickcai
  • 浏览: 238994 次
  • 性别: Icon_minigender_1
  • 来自: 北京
社区版块
存档分类
最新评论

ftp 配置

    博客分类:
  • web
 
阅读更多

配置目录

/usr/local/proftp/etc/proftpd.passwd

配置文件

 

/usr/local/proftp/etc/proftpd.conf
 
 
ServerName "ProFTPD"
ServerType standalone
DefaultServer on
 
timesGMT off
# Port 21 is the standard FTP port.
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022
IdentLookups off
UseReverseDNS off
# 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 that the server normally runs at.
User nobody
Group nogroup
 
# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>
 
# A basic anonymous configuration, no upload directories.
#<Anonymous ~ftp>
# 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 30
 
# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
# DisplayLogin welcome.msg
 
# Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE>
# DenyAll
# </Limit>
#<Directory /etc>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
#<Directory /lib64>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /lib>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /bin>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /sbin>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /usr>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /var>
# <Limit ALL>
# DenyAll
# </Limit>
#</Directory>
 
 
#<Directory /home/*>
# <Limit LIST NLST>
# AllowAll
# </Limit>
#</Directory>
 
 
#<Directory />
# <Limit LIST NLST>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /opt>
# <Limit LIST NLST>
# DenyAll
# </Limit>
#</Directory>
 
#<Directory /flash/>
# <Limit LIST NLST>
# AllowAll
# </Limit>
#</Directory>
 
# <Limit WRITE>
# DenyAll
# </Limit>
 
#</Anonymous>
 
AuthOrder mod_auth_file.c
AuthUserFile /usr/local/proftp/etc/proftpd.passwd
RequireValidShell off

命令

ftpasswd --file=/usr/local/proftp/etc/proftpd.passwd --home=/home/work/ftp --shell=/bin/false --name=work --uid=500 --gid=500 --passwd
--home=xxx 指定 ftp 用户登录后的根目录(eg. --home=/home/work)
--name=xxx 指定 ftp 用户名
--uid=500 --gid=500 指定账号关联对应系统用户和组(eg. 99:nobody/500:work 可通过命令 id work查看用户对应uid/gid)
下载
 

重启FTP服务

service proftpd restart
 
cd /usr/local/proftp/sbin
./proftpd
 
 
 
 
 
 

<iframe style="display: none !important;" width="320" height="240"></iframe>

<iframe style="display: none !important;" width="320" height="240"></iframe>

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics