[an error occurred while processing this directive]


Remote Account Management Using WebCom FTP

wftp - command line operations to WebCom ftp server from remote UNIX shell

wedit - edit remote WebCom file "directly"

Introduction

wftp is a program which allows you to log in to the WebCom FTP server, perform an operation, and log out, all in one simple command. For instance, the following command: wftp get logs/log logs you in to the FTP server, retrieves your log file to the current working directory, and logs out, all behind the scenes. Normally you set your user id and password as shell environment variables, but if you don't, you will be prompted for them (or you can put them on the command line as well).

wedit is a script which uses wftp to allow you to edit a file on your WebCom site with one command, e.g., wedit www/welcome.html would log in to the FTP server, retrieve your home page, and invoke your favorite editor (defined by the environment variable EDITOR). After you were done editing, provided you confirmed, the edited file would be transferred back to your WebCom directory. Finally, you are given the opportunity to delete the local copy with one keystroke.

Sample Session

wftp get -u myuser -p mypass www/welcome.html   # retrieve home page
vi welcome.html                                 # edit it
lynx welcome.html                               # test local edited copy
wftp put -u myuser -p mypass www/welcome.html   # put it back to webcom
rm welcome.html                 # delete local copy (it's in curr. dir)
                                # LATER...
export wftp_u=myuser            # tired of typing -u myuser
export wftp_p=mypass            # and -p mypass?
wftp get www/welcome.html       # now it's easier than ever to get,
vi welcome.html                 # edit (or better yet edit directly
lynx welcome.html               # from lynx with 'e' as you test)
export wftp_d=www               # tired of typing www/?
wftp put welcome.html           # getting easier all the time!
export EDITOR=pico              # (s/b already set in your .profile/.cshrc)
wedit welcome.html              # just do it all in one step!
lynx welcome.html               # don't forget to test! :)
wftp chmod 755 -a -d pub_files  # make all files in /pub_files public

Detailed Specifications

wftp - command line operations to WebCom ftp server from UNIX shell
        copyright 1994 Web Communications(sm)

usage: wftp command [-[asv]] [-u userid] [-p password] [-d directory]
        [[remote/path/]remote-file]

commands:       chmod nnn       change file permissions (numeric mask only)
                delete          delete remote file
                dir             remote directory list
                get             retrieve remote-file to current directory
                put             put remote-file from current directory

options:        -a              do the operation on all files in the remote 
                                directory
                -d directory    subdir of your WebCom home directory
                -s              report transfer stats
                -v              verbose - show dialogue w/FTP server
                -u userid       WebCom userid
                -p password     WebCom password
                remote/path     equivalent to using -d
                remote-file     the name of the file on your WebCom directory
                                *and* the name of the file in your *current*
                                local directory (for put/get)

env_vars:       wftp_a          same as -a if defined (set to any value)
                wftp_d          can be used instead of -d directory
                wftp_u          can be used instead of -u userid
                wftp_p          can be used instead of -p password
                wftp_v          same as -v if defined (set to any value)
                wftp_s          same as -s if defined (set to any value)

Command line switches always override environment variables for the same option, but environment variables can be used to eliminate the need to re-specify options such as login parms over and over again for each command.

If -u userid is not specified, and $wftp_u is not defined, wftp prompts for WebCom userid.

If -p userid is not specified, and $wftp_p is not defined, wftp prompts for WebCom password. For security, password entry is not echoed.

The -a switch can be used to perform an operation on all files in your home directory, or the directory specified by the -d switch or the wftp_d environment variable.

wftp is used by the WebCom wedit tool which allows you to retrieve a file from webcom, edit it (with the editor of your choice), and save it back to webcom, all with one command: wedit filename.

Currently we have versions for SunOS, HP-UX S800, SCO, and Linux 1.1.86; if you have a shell account with another flavor of UNIX, and you'd like this tool, let us know.

Installation Instructions

First, you'll need the executable program, wftp. You may want to create a webcom subdirectory in your home directory for this and other webcom tools. When you save to a local file, name it simply wftp

Retrieve wftp for SunOS:


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wftp_SunOS.bin Save as wftp

or Retrieve wftp for HP-UX S800:


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wftp_HP-UX.bin Save as wftp

or Retrieve wftp for IRIX 5.3


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wftp_IRIX_5.3.bin Save as wftp

or Retrieve wftp for SCO UNIX:


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wftp_SCO.bin Save as wftp

or Retrieve wftp for Linux 1.1.86:


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wftp_linux_1.1.86.bin Save as wftp

Retrieve wedit shell script:


ftp://ftp.webcom.com/~webcom/pub4/webcom/tools/wedit.bin Save as wedit

Next, make them executable:

chmod +x wftp

chmod +x wedit

The above is sufficient. Each of the above commands will now work. However, the more sophisticated installation which follows will make them much easier to use

Firstly, you'll want make sure these files are in your executable search path, so you can execute them regardless of whether you're in the directory in which they reside at the moment you want to use one of them. Append the following to the end of your PATH assignment in your .profile (or .cshrc for csh users):

:$HOME/webcom

(this assumes you've located the utilities in a subdirectory called webcom of your home directory. If you put it in your home directory, just make sure $HOME is in your path).

Additionally, you may want to set your user id in an environment variable so you don't have to type it in each time you run wftp. Also, if you're confident in your ability to keep your .profile/.cshrc secure, you may choose to set your webcom password this way as well (you'll probably want to put them in your .profile/.login so they're always set).

ksh                        csh                         other
========================== =========================== =======================

export wftp_u=youruserid   setenv wftp_u youruserid    wftp_u=youruserid
export wftp_p=yourpassword setenv wftp_p yourpassword  export wftp_u
                                                       wftp_p=yourpassword
                                                       export wftp_p

You may also want to set wftp_d to www since that's where most of your editing will take place, to alleviate having to type the subdirectory with the -d switch or on the filename each time

If you need further assistance getting wftp working, let us know at WebCom support

[an error occurred while processing this directive]