5.29.2006

using WS_FTP to automate file xfers

Some notes:


  • Many options in WS_FTP are now user-specific, i.e. the changes made to the options are only reflected in that current user's profile.

  • PGP support is now included in V9, but I'd rather do the encryption/decryption outside of ws_ftp and use the 'gpg' tool instead. By default, ws_ftp will try to decrypt and verify every file downloaded with a .pgp extension. This option must be turned off. Go into the options under the PGP section and uncheck the "Always decrypt & verify encrypted and signed".

  • If WS_FTP needs to be reinstalled, make sure you go in and out of the application and verify the options that you changed are still intact.

  • I had to connect to each site to make sure the connections were still good. In the process of doing so I needed to click "Trust this connection" on any of the SSH connections because a new fingerprint was generated.

  • Each user profile has a registry setting pointing to the application data directory. After the upgrade this initially pointed to the user's specific profile, so we had to change it back to the following:

[HKEY_CURRENT_USER\Software\Ipswitch\WS_FTP]

"DataDir"="C:\\Documents and Settings\\All Users\\Application Data\\Ipswitch\\WS_FTP"

  • Since we typically use the 'local_assigned' user account and he's not an admin on windowBox1, we needed to change some registry permissions in order to allow some options to be read and customized. We changed the security on the following registry key:

[HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch] -- added WindowsGroup1 group with 'Full Control'

  • The speed of uploads on SSH servers dropped in half in v.9.01. Add "sftppipefraction=150" to the sftp/ssh site's section in ws_ftp.ini to gain full speed. Without this, every lifemasters transfer failed.



WS_FTP Pro notes v8: (some of this applies to v9 as well)

http://www.ipswitch.com/


Installation:

During the install it will ask about "shared" and "personal" sites. The only option we want selected is the "Allow users to create or modify shared sites". The reason for this is that it simplifies where the site data is held. Shared sites go into the "all users" profile directory. "Personal" sites go to the individual user profile, which means if switching from one user account to another, the ws_ftp.ini file would have to be copied over as well. The registry settings this affects are recorded below.


[HKEY_LOCAL_MACHINE\SOFTWARE\Ipswitch\WS_FTP]

"DataDir"="C:\\Documents and Settings\\All Users\\Application Data\\Ipswitch\\WS_FTP"

"AllowPersonalSites"=dword:00000000

"AllowModifySharedSites"=dword:00000001


Directories and files:

shared sites (shared by all users) stored in:

C:\Documents and Settings\All Users\Application Data\Ipswitch\WS_FTP\Sites\ws_ftp.ini


Predefined Sites stored in: predef.ini

MySites are stored in: original.ini


Any folders created will generate an .ini file based on the folder name. The ini file will contain any sites created under that folder.


Log files stored (usually over-wrote each time WS_FTP is called from the command line):

C:\Documents and Settings\All Users\Application Data\Ipswitch\WS_FTP\Logs


You can copy sections of an .ini file from one computer to another but the password may have to be re-entered on the destination computer because of the way WS_FTP encrypts the password field.


Must use fully qualified path because the command line instance will bring us to the root directory. Otherwise it will default to /usr/bin on some systems.


File specifications for uploading/downloading can be wildcarded. ( * or . )


command line example

NOTE: Trailing slash must be used for destination directory....


cd "%programfiles%\ws_ftp pro" &

wsftppro -s ftp://anonymous:test@ftp.ipswitch.com/pub/msdos/vmenu.zip -d local:c:\


ascii

cd "%programfiles%\ws_ftp pro" & wsftppro -s amisys:~/bin/list.sh -d local:c:\ -ascii


binary

cd "%programfiles%\ws_ftp pro" & wsftppro -s amisys:~/bin/list.sh -d local:c:\ -binary


auto

cd "%programfiles%\ws_ftp pro\wsftppro" & wsftppro -s amisys:~/bin/list.sh -d local:c:\


-lower lowercases the filename (only works when uploading TO a remote host, not downloading from a host)


WARNING: Using the command line, be careful that when downloading, the remote file name must be in the EXACT case in order to download the correct file.



The WS_FTP scheduler is just another front-end to the Win2k task scheduler.



No comments: