主机环境:Gentoo 11.2
内核版本:Linux Kernel 3.2.1
这里选择proftpd作为FTP服务器
1、安装proftpd
emerge -av proftpd
2、配置proftpd
首先复制/etc/proftpd/proftpd.conf.sample
cp /etc/proftpd/proftpd.conf.sample /etc/proftpd/proftpd.conf
打开该文件进行适当的修改
下面是我的文件
ServerName "yan's ftp server!" ServerType standalone DefaultServer on RequireValidShell off AuthPAM on AuthPAMConfig ftp RequireValidShell off # Listen on the standard FTP port 21. Port 21 # New directories and files should not be group or world writable. Umask 022 # 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. MaxInstances 30 # The server will run under ftp/ftp. User ftp Group ftp # Every FTP sessions is "jailed" into the user's home directory. DefaultRoot ~ # Generally files are overwritable. AllowOverwrite on # Disallow the use of the SITE CHMOD command. <Limit SITE_CHMOD> DenyAll </Limit> SystemLog /var/log/proftpd.syslog TransferLog /var/log/proftpd.transferlog # A basic anonymous FTP account without an upload directory. <Anonymous /home/ftp> User ftp Group ftp # Every FTP sessions is "jailed" into the user's home directory. DefaultRoot ~ # Generally files are overwritable. AllowOverwrite on # Disallow the use of the SITE CHMOD command. <Limit SITE_CHMOD> DenyAll </Limit> SystemLog /var/log/proftpd.syslog TransferLog /var/log/proftpd.transferlog # A basic anonymous FTP account without an upload directory. <Anonymous /home/ftp> User ftp Group ftp # Clients can login with the username "anonymous" and "ftp". UserAlias anonymous ftp # Limit the maximum number of parallel anonymous logins to 10. MaxClients 10 # Prohibit the WRITE command for the anonymous users. <Limit WRITE> DenyAll </Limit> <Limit LOGIN> Order deny,allow Allow from all </Limit> </Anonymous>
3、启动服务/etc/proftpd/proftpd start
如果正常这样默认的FTP配置的服务器就搭建好了。
本人遇到了一个问题,就是ftp用户登录的时候总是登录失败,看了下日志