- 论坛徽章:
- 7
|
闲来自己架了一个匿名的proftp,
下载source code
ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2c.tar.gz
wget ftp://ftp.proftpd.org/distrib/source/proftpd-1.3.2c.tar.gz
解压编译
gtar zxvf proftpd-1.3.2c.tar.gz
cd /proftpd-1.3.2c
./configure --prefix=/usr/local
make
make install
添加默认用户ftp
groupadd ftp
useradd -g ftp ftp
passwd -l ftp
vi /usr/local/etc/proftpd.conf
- ServerName "Guptill FTP Server"
- ServerType standalone
- DefaultServer on
- Port 21
- UseIPv6 off
- Umask 022
- MaxInstances 30
- User nobody
- Group nogroup
- DefaultRoot ~
- AllowOverwrite on
- <Limit SITE_CHMOD>
- DenyAll
- </Limit>
- <Anonymous /export/docroot>
- User ftp
- Group ftp
- MaxClients 10
- DisplayLogin welcome.msg
- DisplayChdir .message
- <Limit WRITE>
- DenyAll
- </Limit>
- </Anonymous>
复制代码
vi /var/svc/manifest/network/proftp.xml
- <?xml version="1.0"?>
- <!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
- <service_bundle type='manifest' name='export'>
- <service name='network/proftpd' type='service' version='0'>
- <instance name='proftpd' enabled='false'>
- <dependency name='network' grouping='require_all' restart_on='error' type='service'>
- <service_fmri value='svc:/milestone/network:default'/>
- </dependency>
- <dependency name='filesystem-local' grouping='require_all' restart_on='none' type='service'>
- <service_fmri value='svc:/system/filesystem/local:default'/>
- </dependency>
- <exec_method name='start' type='method' exec='/usr/local/sbin/in.proftpd' timeout_seconds='10'
- >
- <method_context/>
- </exec_method>
- <exec_method name='stop' type='method' exec='/usr/bin/pkill -9 -U root proftpd' timeout_second
- s='5'>
- <method_context/>
- </exec_method>
- <exec_method name='refresh' type='method' exec='/usr/bin/pkill -1 -U root proftpd' timeout_sec
- onds='5'>
- <method_context/>
- </exec_method>
- <property_group name='proftpd' type='application'>
- <stability value='Evolving'/>
- <propval name='ssl' type='boolean' value='false'/>
- </property_group>
- <property_group name='startd' type='framework'>
- <propval name='ignore_error' type='astring' value='core,signal'/>
- </property_group>
- </instance>
- <stability value='Evolving'/>
- <template>
- <common_name>
- <loctext xml:lang='C'>ProFTPD Server</loctext>
- </common_name>
- <documentation>
- <manpage title='proftpd' section='8' manpath='/usr/local/man'/>
- <doc_link name='www.proftpd.org' uri='http://www.proftpd.org'/>
- </documentation>
- </template>
- </service>
- </service_bundle>
复制代码
svccfg import /var/svc/manifest/network/proftp.xml
svcadm enable proftpd
svcs proftpd
然后proftpd就可以正常使用了。
参考文档:819-5150.pdf
www.proftpd.org |
|