Using CGI

Server OS: Ubuntu Server

Available filename extensions and programming languages

ExtensionLanguageInstallation location
.cgiPerl, sh など/usr/bin/perl, /bin/sh など
.rbRuby/usr/bin/ruby
.rhtmleRuby/usr/bin/erb
.pyPython/usr/bin/python
.phpPHP/usr/bin/php

* .cgi is basically usable in any language.
* .pl is not available.

Publishing URL
https://cgi.u.tsukuba.ac.jp/~Username/

CGI can be used by the procedures below.

  1. Create a folder named “cgi-bin” in the wwws folder.
  2. Put the CGI files in the “cgi-bin” folder.
  3. Set the execute permission on the CGI files.

* Please note the following when setting the execute permission on CGI programs.

  • It cannot be executed if others are writable (777 etc.).
  • Other than .php and .rhtml it runs with the owner privilege, so it will work with 700 (of course it will also work with 755).
  • Since .php and .rhtml run with different privileges from the owner, you need to make it 755 etc. In addition, it is necessary to set permissions for others on files and directories to be accessed from .php or .rhtml programs.

Access Restrictions

The Zengaku Computer System CGI server has the following access restrictions

  • cgi.u.sukuba.ac.jp cannot be accessed from off-campus. It can only be accessed from within our university.
  • Contents placed in your local_only folder can be accessed from satellite terminals of the Zengaku Computer System and remote servers (Windows :view-con00, Linux : icho01, icho02, kiri).

    [Details]
    If you create a local_only folder in your cgi-bin folder and place the contents in it, they can be viewed only from terminals and servers of The Zengaku Computer System as described above.
    Example: /home/Username/wwws/cgi-bin/local_only/aaa.cgi
    URL: https://cgi.u.tsukuba.ac.jp/~Username/local_only/aaa.cgi