---
name: "wnupdatewww"
section: "8"
platform: "linux"
package: "wn"
version: "2.2.9-2"
release: "Debian 3.0 (Woody)"
platforms: ["linux"]
url: "https://new.carta.tech/wnupdatewww"
---

# wnupdatewww(8)

enable access to standard directories through wn HTTP server

## NAME

wnupdatewww - enable access to standard directories through wn HTTP server

## SYNOPSIS

**wnupdatewww** (**-d**\|**-c**\|**-o** *target\_directory*) (**-i**\|**-m** *src\_directory* \[**-a** *name*\] \[**-r**\])

## DESCRIPTION

**wnupdatewww** is a Debian specific [**sh**(1)](/sh/1.md) program that is part of the [**wn**(1)](/wn/1.md) HTTP server package. [**wn**(1)](/wn/1.md) will not serve files in a directory without an *index.cache* file. **wnupdatewww** provides two methods for supplying a simple default *index.cache* file that will enable access to all files in a directory hierarchy.

You should only use this program when there are no restriction of any sort on who can access the files.  If there are restrictions, I strongly recommend that you supply your own *index* file and run [**wndex**(8)](/wndex/8.md) directly.

The first method, which I recommended, mirrors a directory hierarchy but not its contents. **wnupdatewww** recursively examines each directory.  If a directory already contains both an *index* and *index.cache* file, it sets a symbolic link to that directory and doesn't recurse into any subdirectories.  Otherwise it creates both the *index* and *index.cache* files that allow access indirectly through [**wn**(1)](/wn/1.md) using the **File-Module** directive (seed  **http:/doc/wn/module.html**). This is combined with **wncat**(1) to provide transparent decompression of HTML files.  The original directory hierarchy is not modified by this method so it is appropriate for read-only hierarchies.  The downside is the disk space required which amount to 1.7 Mbytes for */usr/doc* on my system.  Also, problematic is the effort required to keep the mirror consistent with the original directory hierarchy.  This has been automated with */etc/cron.daily/wn* which is described in [**wn**(1)](/wn/1.md) overview.

The second approach is to recurse through a directory hierarchy and create both the *index* and *index.cache* files that allow access to all files in the directory directly.  This is simpler than the first approach and more efficient space wise.  The disadvantages is that it requires write-access to the "source" directory.

## OPTIONS

- **-a** *name*

  Define an alias *name* for the "target" directory when creating a mirror of "source" directory.  Can only be used when the option **-m** is supplied.

- **-c**

  Use *wn\_www\_root/cgi-bin* as "target" directory where *wn\_www\_root is defined in* */etc/wn/wn.conf* configuration file.  The directory must exist.  One and only one of the options **-d -c -o** must be supplied.

- **-d**

  Use *wn\_www\_root/doc* as "target" directory where *wn\_www\_root is defined in* */etc/wn/wn.conf* configuration file.  The directory must exist.  One and only one of the options **-d -c -o** must be supplied.

- **-i**

  Recurses into "target" directory and insert a [**wn**(1)](/wn/1.md) *index* and *index.cache* files in each subdirectory.  The *index* file simple grants access to any file in the directory.  Note that this modifies the "target" directory so it won't work on read-only directories.

- **-m** *src\_directory*

  Mirrors *src\_directory* "source" directory into "target" directory with optionally the alias *name* defined by the **-a** option and insert a [**wn**(1)](/wn/1.md) *index* and *index.cache* file in each subdirectory.  The index file uses redirection to the original directory location and supports transparently compressed and uncompressed files.  Executable files are referred to by symbolic links.  Note that this doesn't modify *src\_directory* and can be used for read-only directories.

- **-o** *directory*

  Use *target\_directory* as "target" directory.  The directory must exist.  Note that if it is not in the wn www root directory, access will not be possible. Symbolic links can be used however.  One and only one of the options **-d -c -o** must be supplied.

- **-r**

  Remove the previous contents of target directory before mirroring the source directory.  Can only be used with the **-m** option.

## EXAMPLES

To mirror the entire */usr/doc* hierarchy in */var/www/doc* with overwriting of all existing directories:

```
        updatewww -o /var/www -m /usr/doc -r
```

To mirror the */opt/wn/doc* hierarchy in */var/www/doc/wn* without overwriting any other directories:

```
        updatewww -d -m /opt/wn/doc -a wn
```

To insert *index* and *index.cache* files directly into */var/www/dwww* use:

```
        updatewww -o /var/www/dwww -i
```

## FILES

- *index*

  Input file to [**wndex**(8)](/wndex/8.md) program.

- *index.cache*

  Output file from [**wndex**(8)](/wndex/8.md) program which defines access control for directory.

- */etc/wn/wn.conf*

  Main Debian specific configuration file for [**wn**(1)](/wn/1.md) package.

- */etc/cron.daily/wn*

  Debian specific [**sh**(1)](/sh/1.md) program to re-index standard documentation directories.  It is run daily by the [**cron**(8)](/cron/8.md) daemon.

## SEE ALSO

[**wn**(1)](/wn/1.md), [**wn\_mkdigest**(1)](/wn_mkdigest/1.md), [**wn\_uncache**(1)](/wn_uncache/1.md), [**wndex**(1)](/wndex/1.md), [**wnindexmaker**(1)](/wnindexmaker/1.md), [**wnpnuts**(1)](/wnpnuts/1.md), [**wnauth**(3)](/wnauth/3.md), [**wncat**(3)](/wncat/3.md), [**wnhtmlify**(3)](/wnhtmlify/3.md), [**wnredir**(3)](/wnredir/3.md), [**wnsectsearch**(3)](/wnsectsearch/3.md), [**wnseven\_m**(3)](/wnseven_m/3.md), [**wn\_md5passwd**(8)](/wn_md5passwd/8.md), [**wn\_mkpasswd**(8)](/wn_mkpasswd/8.md), [**wnconfig**(8)](/wnconfig/8.md), [**wnd**(8)](/wnd/8.md), [**wnsd**(8)](/wnsd/8.md), [**wnv2c**(8)](/wnv2c/8.md)\
 **http:/doc/wn/manual.html**\
 **http://hopf.math.nwu.edu/**

## AUTHOR

**wn** is written by John Franks \<john@math.nwu.edu\>.  Modified by Jean Pierre LeJacq \<jplejacq@quoininc.com\> as part of packaging for the Debian GNU/Linux distribution. Manual page also added by Jean Pierre LeJacq.
