Editing Transfer user accounts from Another FTP Server
From FileZilla Wiki
Jump to navigationJump to searchWarning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | This is a | + | This is a perl script that read G6FTPD user accounts file users.ini, extract some information (login, password, folder and rights) and write it in FilleZilla Server account file "FileZilla Server.xml". |
− | Sorry I can't find how | + | Sorry I can't find how write code properly in this Wiki :s |
− | + | ==Code== | |
#!C:\Perl\bin -w | #!C:\Perl\bin -w | ||
use Digest::MD5 qw(md5_hex); | use Digest::MD5 qw(md5_hex); | ||
Line 62: | Line 62: | ||
− | $paramdivers = '<Option Name="Group" | + | $paramdivers = '<Option Name="Group"/> |
<Option Name="Bypass server userlimit">0</Option> | <Option Name="Bypass server userlimit">0</Option> | ||
<Option Name="User Limit">0</Option> | <Option Name="User Limit">0</Option> | ||
<Option Name="IP Limit">0</Option> | <Option Name="IP Limit">0</Option> | ||
<Option Name="Enabled">1</Option> | <Option Name="Enabled">1</Option> | ||
− | <Option Name="Comments" | + | <Option Name="Comments"/> |
<Option Name="ForceSsl">0</Option> | <Option Name="ForceSsl">0</Option> | ||
<IpFilter> | <IpFilter> | ||
− | <Disallowed /> | + | <Disallowed/> |
− | <Allowed /> | + | <Allowed/> |
</IpFilter> | </IpFilter> | ||
<Permissions>'; | <Permissions>'; | ||
− | $userfin= '</Permissions> | + | $userfin='</Permissions> |
− | <SpeedLimits DlType="0" DlLimit="10" ServerDlLimitBypass="0" UlType="0" UlLimit="10" | + | <SpeedLimits DlType="0" DlLimit="10" ServerDlLimitBypass="0" UlType="0" UlLimit="10" ServerUlLimitBypass="0"> |
− | <Download /> | + | <Download/> |
− | <Upload /> | + | <Upload/> |
</SpeedLimits> | </SpeedLimits> | ||
</User>'; | </User>'; | ||
Line 116: | Line 116: | ||
$fz.= $userfin."\n"; | $fz.= $userfin."\n"; | ||
} | } | ||
− | } | + | } |
− | |||
$fz.= $fin; | $fz.= $fin; | ||
close FICHIER; | close FICHIER; | ||
Line 126: | Line 125: | ||
print " ".$i.' account created'; | print " ".$i.' account created'; | ||
− | |||
− | |||
− | |||
---- | ---- | ||
JeF | JeF | ||
geek AT jfmcorp DOT org | geek AT jfmcorp DOT org |