SUMMARY: DEC UNIX ftp..

From: Cenon B.C. Marana Jr. <bonn_at_durian.usc.edu.ph>
Date: Tue, 11 Jul 1995 22:35:31 +0800 (HKT)

Thanks to those who responded namely:
Matt Thomas <thomas_at_lkg.dec.com>
Ross Alexander <rwa_at_cs.athabascau.ca>
"Ian K. Piumarta" <Ian.Piumarta_at_inria.fr>

> Hello All!
>
> I just would like to inquire if there are ways and means on how
> to tinker the DEC UNIX ftp wherein the ! option would be disabled to
> restrict its use.

The easiest thing to do is to set the SHELL variable to something harmless
before invoking FTP. For example, from a sh or ksh you can do

        prompt$ SHELL=/bin/true
        prompt$ ftp
        ftp> !ls
        ftp>

You can place the name of any program in the SHELL variable and the actual
command used in FTP will be passed as an argument. For example, "!ls" in FTP
runs "$SHELL -c ls", so we can easily get the following effect:

        prompt$ SHELL=/bin/echo
        prompt$ ftp
        ftp> !ls -l
        -c ls -l
        ftp>

(where /bin/echo has echoed the arguments to the ! command).


(If you use csh or similar you will have to use

        prompt% setenv SHELL /bin/echo
        prompt% ftp
        ...
instead.)
                      


Bonn
:)
Received on Tue Jul 11 1995 - 17:20:06 NZST

This archive was generated by hypermail 2.4.0 : Wed Nov 08 2023 - 11:53:45 NZDT