Sun Java System Web Server 6.1 SP12 Programmer's Guide

Specifying a Unique CGI Directory and UNIX User and Group for a Virtual Server

To prevent CGI programs of the virtual server from interfering with other users, these programs should be stored in a unique directory and executed with the permissions of a unique UNIX user and group.

First, create the UNIX user and group. The exact steps required to create a user and group vary by operating system. For instructions, consult your operating system's documentation.

ProcedureTo create a cgi-bin directory for the virtual server

  1. Log in as the superuser.


  2. Change to the virtual server directory.

    cd vs_dir

  3. Create the cgi-bin directory.

    mkdir cgi-bin

    chown user:group cgi-bin

    chmod 755 cgi-bin

    Now you can set the virtual server’s CGI directory, user, and group in one of these ways: