3 为proftpd和apache设置用户
adduser webuser
修改/etc/passwd,找到webuser行,将最后的/bin/bash 改为 /bin/false
4 proftpd
配置文件在 /opt/lampp/etc/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. ServerName \"ProFTPD\" ServerType standalone DefaultServer on # 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 # 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 webuser Group webuser AllowOverwrite on # only for the web servers content DefaultRoot ~ # nobody is no normal user so we have to allow users with no real shell RequireValidShell off # nobody may be in /etc/ftpusers so we also have to ignore this file UseFtpUsers off # Bar use of SITE CHMOD by default <Limit SITE_CHMOD> DenyAll </Limit> # Allow to resume not only the downloads but the uploads too AllowRetrieveRestart on AllowStoreRestart on IdentLookups off UseReverseDNS off #设置虚拟用户验证文件 AuthOrder mod_auth_file.c mod_auth_unix.c AuthUserFile /opt/lampp/etc/proftpd_auth/ftpd.passwd AuthGroupFile /opt/lampp/etc/proftpd_auth/ftpd.group MaxClients 10 MaxHostsPerUser 1 \"Sorry, you may not connect more than one time.\" MaxClientsPerHost 10 \"Only one such user at a time.\" MaxClientsPerUser 10 \"Sorry, you may not connect more than one time.\" TimeoutIdle 600 ServerLog /opt/lampp/logs/proftpd/proftpd.log ExtendedLog /opt/lampp/logs/proftpd/proftpd_read.log READ ExtendedLog /opt/lampp/logs/proftpd/proftpd_write.log WRITE
以上是一些基本的配置
/opt/lampp/etc/proftpd_auth 该目录需要自己创建
下面介绍一下创建虚拟用户(这些配置都来自网上某些文章,不记得哪里来了,若有作者看到了见谅见谅)
# ftpasswd –passwd –file=/etc/proftpd/ftpd.passwd –name=ftpadmin –uid=99 –home=/home/ftpdata –shell=/sbin/nologin
# ftpasswd –group –file=/etc/proftpd/ftpd.group –name=admin –gid=99
# ftpasswd –group –name=admin –gid=99 –member=ftpadmin
ftpasswd 在xampp的proftpd版本里面是没有的,可以在以下网页下载
http://www.castaglia.org/proftpd/
0 条评论。