diff --git a/plugins/pureftp/conf/pure-ftpd.conf b/plugins/pureftp/conf/pure-ftpd.conf index 67fe7f748..6b268418d 100644 --- a/plugins/pureftp/conf/pure-ftpd.conf +++ b/plugins/pureftp/conf/pure-ftpd.conf @@ -25,5 +25,11 @@ AutoRename no AnonymousCantUpload no MaxDiskUsage 99 CustomerProof yes -PIDFile /var/run/pure-ftpd.pid +PassivePortRange 48000 50000 +PIDFile {$SERVER_PATH}/pureftp/etc/pure-ftpd.pid PureDB {$SERVER_PATH}/pureftp/etc/pureftpd.pdb + +VerboseLog yes +#AltLog clf:{$SERVER_PATH}/pureftp/pureftpd.log +AllowOverwrite on +AllowStoreRestart on \ No newline at end of file diff --git a/plugins/pureftp/index.py b/plugins/pureftp/index.py index 7b77bd6ad..5a77099d9 100755 --- a/plugins/pureftp/index.py +++ b/plugins/pureftp/index.py @@ -110,8 +110,9 @@ def initDreplace(): pureFtpdConfigBak = getServerDir() + "/etc/pure-ftpd.bak.conf" pureFtpdConfigTpl = getPluginDir() + "/conf/pure-ftpd.conf" - if not os.path.exists(pureFtpdConfigBak): - shutil.copyfile(pureFtpdConfig, pureFtpdConfigBak) + if not os.path.exists(pureFtpdConfigBak) or not os.path.exists(pureFtpdConfig): + if os.path.exists(pureFtpdConfig): + shutil.copyfile(pureFtpdConfig, pureFtpdConfigBak) content = mw.readFile(pureFtpdConfigTpl) content = contentReplace(content) mw.writeFile(pureFtpdConfig, content) diff --git a/plugins/pureftp/init.d/pure-config.pl b/plugins/pureftp/init.d/pure-config.pl index bf6e98278..7d722b7a6 100644 --- a/plugins/pureftp/init.d/pure-config.pl +++ b/plugins/pureftp/init.d/pure-config.pl @@ -10,7 +10,7 @@ my ($conffile, @flg) = @ARGV; my $PUREFTPD; -x && ($PUREFTPD=$_, last) for qw( {$SERVER_PATH}/pureftp/sbin/pure-ftpd - /www/server/pure-ftpd/sbin/pure-ftpd + /www/server/pureftp/sbin/pure-ftpd /www/server/pureftpd/sbin/pure-ftpd /www/server/sbin/pure-ftpd /usr/sbin/pure-ftpd diff --git a/plugins/pureftp/init.d/pure-ftpd.tpl b/plugins/pureftp/init.d/pure-ftpd.tpl index f30ba88f1..af51ca29d 100644 --- a/plugins/pureftp/init.d/pure-ftpd.tpl +++ b/plugins/pureftp/init.d/pure-ftpd.tpl @@ -17,7 +17,7 @@ # Pure-FTPd Settings PURE_PERL="{$SERVER_PATH}/pureftp/sbin/pure-config.pl" PURE_CONF="{$SERVER_PATH}/pureftp/etc/pure-ftpd.conf" -PURE_PID="/var/run/pure-ftpd.pid" +PURE_PID="{$SERVER_PATH}/pureftp/etc/pure-ftpd.pid" RETVAL=0 prog="Pure-FTPd"