主机环境:Gentoo 11.2
内核版本:Linux Kernel 3.2.1
原创作品,转载请标明http://blog.csdn.net/yming0221/article/details/7360370
这里选择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用户登录的时候总是登录失败,看了下日志
Mar 16 12:05:46 yan-laptop proftpd[15868] yan-laptop: ProFTPD 1.3.3g (maint) (built Fri Mar 16 2012 10:36:06 CST) standalone mode STARTUP
Mar 16 12:05:46 yan-laptop proftpd[15819] yan-laptop (yan-laptop[::ffff:127.0.0.1]): FTP session closed.
Mar 16 12:05:52 yan-laptop proftpd[15877] yan-laptop (yan-laptop[::ffff:127.0.0.1]): FTP session opened.
Mar 16 12:05:57 yan-laptop proftpd[15877] yan-laptop (yan-laptop[::ffff:127.0.0.1]): ftp: Directory /home/ftp/ is not accessible.
Mar 16 12:07:39 yan-laptop proftpd[15877] yan-laptop (yan-laptop[::ffff:127.0.0.1]): FTP session closed.
Mar 16 12:11:00 yan-laptop proftpd[15868] yan-laptop: ProFTPD killed (signal 15)
Mar 16 12:11:00 yan-laptop proftpd[15868] yan-laptop: ProFTPD 1.3.3g standalone mode SHUTDOWN
解决方法:
去掉aclUSE标记,重新编译proftpd安装
USE="-acl" emerge proftpd
重启服务后问题解决。
分享到:
相关推荐
在Gentoo Linux下绘制高质量的PostScript矢量图形.pdf
由于[2]Portage技术的产生,Gentoo Linux可以担当一个理想的安全服务器、开发平台、专业级桌面应用、游戏服务器、嵌入式应用等等各种角色。由于其无限制的可配置性,我们甚至可以称Gentoo Linux为一个元发行版。
在sun服务器上安装gentoo linux 2007 目前sun服务器只能安装gentoo debian
Gentoo Linux 安装笔记 Gentoo Linux 安装笔记 Gentoo Linux 安装笔记
Gentoo的手册,中文,对安装和研究linux很有帮助。 gentoo是很独特的发行版,和其他不同,安装需要手动一步步进行,软件安装也类似freebsd的port方式。具有高度定制性。
Gentoo Linux 安装手册, Gentoo Linux安装完整教程, 内容详细, 包你一次就会, 绝对精彩. Gentoo Linux 安装手册完整教程!
Gentoo Linux文档 -- Gentoo Linux x86手册
Gentoo Linux nVidia指南
gentoolinux安装教程
SUN服务器安装Gentoo Linux全程指导,提供安装指南
Gentoo Linux 2008 x86手册(安装) Gentoo Linux 2008 x86手册(安装)
Gentoo_Linux_x86手册.pdf Gentoo_Linux_x86手册.pdf Gentoo_Linux_x86手册.pdf
Gentoo Linux AMD64 手册
Gentoo Linux x86手册.pdf
自从Gentoo 1.0面世后,它就像一场风暴,给Linux世界带来了巨大的惊喜,同时也吸引了大量的用户和开发者投入Gentoo Linux的怀抱。 有人这样评价Gentoo:快速、设计干净而有弹性,是一个现代模式的发行版。与其它...
gentoo linux 的安装,本人学习gentoo linux 3年的结晶,写成文档,仅供学习参考。
Gentoo是一个基于Linux的自由操作系统,它能为几乎任何应用程序或需求自动地作出优化和定制。追求极限的配置、性能,以及顶尖的用户和开发者社区,都是Gentoo体验的标志特点。 Gentoo的哲学是自由和选择。得益于一种...
Gentoo Linux x86 handbook官方PDF
This a Gentoo Linux documentation guide.
如何安装gentoo linux.docx