ProFTP configuration: generate pacs.conf only instead of whole master
configuration file.
This commit is contained in:
parent
c5fe591298
commit
545ad6fc16
@ -130,7 +130,7 @@ public class PacProcessorFactory implements EntityProcessorFactory {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private Processor createProftpdConfProc(Hive hive) throws ProcessorException {
|
private Processor createProftpdConfProc(Hive hive) throws ProcessorException {
|
||||||
return new VelocityProcessor("/de/hsadmin/mods/pac/proftpd-conf.vm", hive, "/etc/proftpd/proftpd.conf", true);
|
return new VelocityProcessor("/de/hsadmin/mods/pac/proftpd-pacs-conf.vm", hive, "/etc/proftpd/pacs.conf", true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Processor createAddUserProc(String pacName, UnixUser unixUser, String password) {
|
private Processor createAddUserProc(String pacName, UnixUser unixUser, String password) {
|
||||||
|
@ -1,90 +0,0 @@
|
|||||||
#
|
|
||||||
# This file is managed by HSAdmin.
|
|
||||||
# Do not edit manually. Changes will be overwritten.
|
|
||||||
#
|
|
||||||
|
|
||||||
Include /etc/proftpd/modules.conf
|
|
||||||
|
|
||||||
ServerName "Hostsharing eG"
|
|
||||||
ServerType standalone
|
|
||||||
DeferWelcome off
|
|
||||||
UseIPv6 off
|
|
||||||
UseReverseDNS off
|
|
||||||
IdentLookups off
|
|
||||||
|
|
||||||
ShowSymlinks on
|
|
||||||
MultilineRFC2228 on
|
|
||||||
DefaultServer on
|
|
||||||
ShowSymlinks on
|
|
||||||
AllowOverwrite on
|
|
||||||
|
|
||||||
RequireValidShell off
|
|
||||||
DefaultRoot ~
|
|
||||||
AllowForeignAddress on
|
|
||||||
|
|
||||||
TimeoutNoTransfer 900
|
|
||||||
TimeoutStalled 900
|
|
||||||
TimeoutIdle 1800
|
|
||||||
|
|
||||||
DisplayLogin welcome.msg
|
|
||||||
ListOptions "-la"
|
|
||||||
|
|
||||||
DenyFilter \*.*/
|
|
||||||
|
|
||||||
Port 21
|
|
||||||
MaxInstances 128
|
|
||||||
User nobody
|
|
||||||
Group nogroup
|
|
||||||
|
|
||||||
LoadModule mod_tls.c
|
|
||||||
TLSEngine on
|
|
||||||
TLSProtocol SSLv23 TLSv1
|
|
||||||
TLSRequired off
|
|
||||||
TLSVerifyClient off
|
|
||||||
TLSRSACertificateFile /etc/proftpd/ftp-cert.pem
|
|
||||||
TLSRSACertificateKeyFile /etc/proftpd/ftp-key.pem
|
|
||||||
TLSCertificateChainFile /etc/proftpd/ftp-chain.pem
|
|
||||||
|
|
||||||
LogFormat default "%h %l %u %t \"%r\" %s %b"
|
|
||||||
LogFormat auth "%v [%P] %h %t \"%r\" %s"
|
|
||||||
LogFormat write "%h %l %u %t \"%r\" %s %b"
|
|
||||||
|
|
||||||
DelayEngine off
|
|
||||||
|
|
||||||
PassivePorts 60000 65534
|
|
||||||
|
|
||||||
<Directory /*>
|
|
||||||
Umask 022 022
|
|
||||||
AllowOverwrite on
|
|
||||||
</Directory>
|
|
||||||
|
|
||||||
#foreach( $pac in ${hive.pacs} )
|
|
||||||
|
|
||||||
<VirtualHost ${pac.curINetAddr.inetAddr}>
|
|
||||||
DefaultRoot ~ ${pac.name}
|
|
||||||
ServerName "Hostsharing eG"
|
|
||||||
AllowOverwrite on
|
|
||||||
AllowForeignAddress on
|
|
||||||
RequireValidShell off
|
|
||||||
|
|
||||||
<Limit LOGIN>
|
|
||||||
Order allow,deny
|
|
||||||
AllowGroup ${pac.name}
|
|
||||||
DenyAll
|
|
||||||
</Limit>
|
|
||||||
<Anonymous /home/pacs/${pac.name}/ftp>
|
|
||||||
User ${pac.name}
|
|
||||||
Group ${pac.name}
|
|
||||||
UserAlias anonymous ${pac.name}
|
|
||||||
UserAlias ftp ${pac.name}
|
|
||||||
DirFakeUser on ftp
|
|
||||||
DirFakeGroup on ftp
|
|
||||||
DirFakeMode 000
|
|
||||||
AuthAliasOnly on
|
|
||||||
<Limit WRITE>
|
|
||||||
DenyAll
|
|
||||||
</Limit>
|
|
||||||
</Anonymous>
|
|
||||||
</VirtualHost>
|
|
||||||
#end
|
|
||||||
|
|
37
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
Normal file
37
hsarback/src/de/hsadmin/mods/pac/proftpd-pacs-conf.vm
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
#
|
||||||
|
# This file is managed by HSAdmin.
|
||||||
|
# Do not edit manually. Changes will be overwritten.
|
||||||
|
#
|
||||||
|
|
||||||
|
#foreach( $pac in ${hive.pacs} )
|
||||||
|
<VirtualHost ${pac.curINetAddr.inetAddr}>
|
||||||
|
DefaultRoot ~ ${pac.name}
|
||||||
|
ServerName "${pac.name}.hostsharing.net"
|
||||||
|
AllowOverwrite on
|
||||||
|
AllowForeignAddress on
|
||||||
|
|
||||||
|
<Limit LOGIN>
|
||||||
|
Order allow,deny
|
||||||
|
AllowGroup ${pac.name}
|
||||||
|
DenyAll
|
||||||
|
</Limit>
|
||||||
|
|
||||||
|
<Anonymous /home/pacs/${pac.name}/ftp>
|
||||||
|
User ${pac.name}
|
||||||
|
Group ${pac.name}
|
||||||
|
UserAlias anonymous ${pac.name}
|
||||||
|
UserAlias ftp ${pac.name}
|
||||||
|
DirFakeUser on ftp
|
||||||
|
DirFakeGroup on ftp
|
||||||
|
DirFakeMode 000
|
||||||
|
AuthAliasOnly on
|
||||||
|
|
||||||
|
<Limit WRITE>
|
||||||
|
DenyAll
|
||||||
|
</Limit>
|
||||||
|
|
||||||
|
</Anonymous>
|
||||||
|
</VirtualHost>
|
||||||
|
|
||||||
|
#end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user