Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 22 Nov 1996 09:23:03 -0600 (CST)
From:      Richard Stanford <richards@herald.net>
To:        Steve <shovey@buffnet.net>
Cc:        David Stickney <david@wvb.gomel.by>, The FreeBSD ISP Mailing list <freebsd-isp@FreeBSD.ORG>
Subject:   Re: The best way to allow users to access a WWW directory
Message-ID:  <Pine.A32.3.91.961122091120.129003A-100000@future.dsc.dalsys.com>
In-Reply-To: <Pine.BSI.3.95.961122084930.8224Y-100000@buffnet11.buffnet.net>

index | next in thread | previous in thread | raw e-mail

On Fri, 22 Nov 1996, Steve wrote:

> 
> 
> In srm.conf you put 
> 
> UserDir public_html

Or alternatively, set up a dedicated (slow/dumb) machine for users to login
to, specifically one that they can crash without bringing down any of your
essential services.  Next, create a place on the webserver for users to put
their pages (ie: /www/users/ ) and create their directories underneath it.  The
users must be in the /etc/passwd file for the webserver, but their password may
be * or something else so that they can never log in.

Now NFS mount the /www/users directory from the webserver over to the telnet/ftp
client mentioned earlier.  Users add their pages to the apparently-local drive,
and they never interfere with your webserver.

Oh, almost forgot -- on the webserver, you can set UserDir to /www/users/ which
tells the engine to look here for user webpages.  Even on a non-dedicated box,
this would allow you to put all webpages onto a seperate drive, rather than
having them intermingled with user's home directories.

If you like, you can always execute as part of your user-setup stcript a:

  ln -s /www/users/u/username /home/u/username/public_html

or something like that.

> Then all each user must do is create a subdirectory in their home
> directory called public_html and place their files in that subdirectory.
> The URL uses ~userid - example:
> 
> http://www.sompeplace.com/~david/Welcome.html
> 
> Would pull up Welcome.html from public_html unde ryour home directory.

Or wherever else specified in UserDir, but yes.

> All files my be world readable (I think read and executeable) -ie 
> chmod 755

Executable?  All files should be at least 444, but that's all --
If files are 644 and directories are 755, that enhances security and allows
indexing to be performed on directorys with no index file.  If the directory
is 711, that enhances user-privacy at the expense of indexing.

> On Thu, 17 Oct 1996, David Stickney wrote:
> 
> > Hello, 

Hey there.

> > I loaded the Apache www server up, and it works and everything.. My question is how would I go about letting users add their own WWW pages with out letting them thrash the syetem?

In my opinion -- this is the safest way.  The users are never ON your webserver.

> > There is a comment "UserDir public_html" where does it go? The only Documentation I have found is the README for the Icons?...

There is documentation and a FAQ at http://www.apache.org/

> > If you help me, Send me your address, I pay. ;>

Don't bother -- just help the next person.  It all evens out, everyone is
happy, and we can all pretend that this is the internet of a few years ago.

> > Thanks,
> > Dave

De nada - Richard

--------------------------------------------------------------------------------
     Contrary to popular belief, Unix is user friendly.  It just happens
       to be very selective about who it decides to make friends with.



home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.A32.3.91.961122091120.129003A-100000>