srvwd

command module
v0.0.0-...-edeb7db Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2012 License: ISC Imports: 10 Imported by: 0

README

srvwd - serve working directory

srvwd is a web server that serves the current working directory.

Dependencies

None. srvwd uses only components in the Go standard library.

Compatibility

srvwd has been tested on the following operating systems:

  • OpenBSD (5.2)
  • OS X (10.8)

Installation

go install will install the binary to the ${GOROOT}/bin directory.

Usage

srvwd [-c cert] [-k key] [-l listeners] [-p port] [-r] [-u user] [-v] dir

-r will cause srvwd to chroot to the current working directory for security.

If a certificate and keyfile are specified, srvwd will run in TLS mode.

Use ^C to halt srvwd.

Why require sudo for chroot?

From chroot(2):

 This call is restricted to the super-user.

srvwd uses root privileges to chroot to the target directory, then immediately drops privileges.

Known bugs / caveats

setgrp isn't implemented here, as no good solution exists in Go.

History

The Go version is descended from the original C version.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL