Setting up the Directory Structure

The cvs access is going to be a little bit strange because there are two different ways that it will be accessed. On the one hand ViewCVS will be accessing the repository from one of Apache's subprocesses and thus within the chroot jail. Regular users however will be accessing the repository from outside of the jail and so it is necessary to set up a series of symlinks, so that the two directory structures appear the same. Rather than clutter the root filesystem with symlinks we will create an artificial structure inside of /home/www.

Outside of the chroot it appears as though the repository is at /home/www/files/cvs/. From within it seems as though it appears to be at /files/cvs. Therefore it is necessary to create some structure such that /home/www/home/www is a relative symlink to /home/www.

One very simple way to do it is to:

        cd /home/www
        ln -s . home
        ln -s . www

/home/www/home/www is now the same place as /home/www. This will work, but there is another setup that makes a little more sense.

In order for apache to allow access of user's home directories ( those directories have to be inside the chroot. In order to place these files on the large storage partition they are at /home/www/files/home (or within the chroot they would appear to be at /files/home.) It makes sense to link these home directories to /home in the chroot:

        cd /home/www
        ln -s files/home

Now to make the two sets of directories line up:

        cd /home/www/files/home
        ln -s ../.. www

Now from within and without the chroot /home/www points to the same directory (and thus /home/www/files/cvs is the same place.)