High-Level Overview

IOVAR Web Shell presently runs in Tomcat on Linux. Thus it has the privileges of the Tomcat user. It is written in Java and shell scripts. Note that even though many of these shell scripts may run in BASH just fine (since the syntax and command names are similar) they are not technically BASH scripts and so there is no guarantee that they will work in any shell interpreter but the one included with this project.

Aside from parsing commands and executing jobs, part of a shell's function is to keep track of an environment for the user. This environment generally consists of current directory, typed-in commands history, executable search path, and other shell-defined and user-defined variables. The IOVAR Web Shell is no different. However, since commands inputted and parsed on one server may in fact point to executables on a different server, there must be a mechanism by which the user's environment can be passed from one server to another. This is currently accomplished by making the environment available at /proc/shell/<hash> (where <hash> is automatically generated) and automatically passing a reference to this location in an HTTP parameter named iosession.

Directory Structure

A well-defined project structure makes it easier for developers and users to find what they are looking for.

Starting at the top of the project (the project root), the significant files and directories are:

  • $ - link to com.iovar.web.bin.shell.Interactive servlet
  • build.xml - Ant build script for compiling, etc.
  • bin/ - core executables
  • dev/ - devices
  • etc/ - configuration
    • shrc - read by the shell when entering interactive mode
    • web.xml - web application configuration for Tomcat
  • nbproject/ - Netbeans project folder (only required if using Netbeans for development)
  • proc/ - system process information
  • src/ - source code
    • com/
      • iovar/
        • web/ - Java sources for com.iovar.web package (this project)
  • usr/ - shareable additions
    • bin/ - additional, non-essential executables
    • local/ - placeholder for site-specific customizations
  • var/ - resources which are likely to be constantly changing (variable data)
    • lib/ - root point for attaching database objects
  • WEB-INF - Java web application resources used by the servlet container


The /WEB-INF directory is the standard location for Java web application resources. A web.xml file in this directory describes for the servlet container how the web application is set up. For convenience, in this project mapping a "program name" to a servlet is accomplished with symbolic links to the .class files on the filesystem instead of editing entries in web.xml. The file /etc/web.xml is copied to /WEB-INF/web.xml with the symbolically-linked servlet entries automatically included (see app.webxml Ant task).

Ant Build

Apache Ant is a powerful and flexible dependency-based build tool. It is used for compiling the Java code, performing file maintenance tasks in the project, and more.

Some noteworthy targets defined for this project include:

  • app - build entire application (default)
  • app.webxml - search for symbolic links to servlets and regenerate web.xml only
  • app.clean - clean up all compiled and temporary files
  • tasks - build only the project Ant tasks

Tomcat Servlet Container

Apache Tomcat is a reliable servlet container that is quick to install and easy to use.

Java Virtual Machine

The Java Virtual Machine provides a consistent and developer-friendly programming environment. It includes features such as automatic garbage collection. The well-defined specification is public and may be implemented by any custom-built virtual machine.

Linux Kernel

The open-source Linux kernel operates on a wide range of hardware. It has a strong security track record and may be modified at-will.

Last modified 4 years ago Last modified on Apr 11, 2014, 3:06:28 AM