11 ms·
I am always on the look out for a small, lightweight and secure web server for impromptu file sharing. Right now I use publicfile from djb.[^1] My only complain
by dfc 13y ago
I am always on the look out for a small, lightweight and secure web server for impromptu file sharing. Right now I use publicfile from djb.[^1] My only complaint is that there is no debian package for publicfile so I have to build my own package. I would love to find an equivalent (ftp not necessary) daemon that is included in debian. Is anyone aware of a something in debian repos that I am overlooking?
[^1]: http://cr.yp.to/publicfile.html http://cr.yp.to/publicfile.html
- justincormack 13y agoWebfsd is in the Debian repos but the stupid person who packaged it created an init script for it as if you want to run it as a service rather than ad hoc. So you may as well build from source...
- davidw 13y agoOr you could contribute something back and file a bug report, or maybe even a patch allowing people to use it either way. Certainly beats insulting someone you don't even know who was trying to make the world a little bit better by doing some free work.
- deleted 13y ago[deleted]
- pmahoney 13y agoThis is hardly in the category of "lightweight and secure", but for impromptu stuff, this Ruby+Rack one-liner serves directory listings and static files from the current directory: ruby -e 'require "rack"; include Rack; \ Server.start :app => Directory.new(".", \ Static.new(nil, :urls => ["/"], :root => "."))'
- dylz 13y agopython -m SimpleHTTPServer
- pekk 13y agoalthough that server is very horrible
- hcarvalhoalves 13y agoWorks fine for some tests, but it's single threaded. If you need concurrency: twistd -no web --path=.
- stock_toaster 13y agoor in go: package main import ( "flag" "net/http" ) var serveDir = flag.String("d", ".", "Directory to serve from") func main() { flag.Parse() panic(http.ListenAndServe("127.0.0.1:8000", http.FileServer( http.Dir(*serveDir)))) }
- deathanatos 13y agoPerhaps, but the use case it usually finds is "I need a webserver, here. Now." Python is nearly always installed, and that depends on nothing but the standard library. You can stick an alias in your dotfiles (I have, it's called "serve-this") and not have to worry about having twisted¹ getting to wherever your dotfiles get put. (I distribute my dotfiles over git/github, so it's really easy to move them around. More work to get Twisted.) ¹Or Ruby… or Go…
- hcarvalhoalves 13y agoTwisted is pre-installed on OS X and various Linux distributions...
- Orangeair 13y agoWhat's wrong with it? Honestly, I don't know. I know Python probably isn't a great choice for performance reasons, but anything else? It's super easy to build off and configure. Seems fine for a beginner (which I admittedly am; hence my asking).
- troels 13y agoThis is mine: #!/bin/bash unlink /Library/WebServer/Documents ln -s "$(pwd)" /Library/WebServer/Documents echo "http://localhost/ mounted on $(pwd)" Of course, it's only "lightweight" in as far as you already have Apache installed and running.
- chubot 13y agoDoesn't DJB's stuff usually compile faster than you can install a Debian package? :) You could always try to package it for Debian, although I understand that's not a small amount of work. I don't know of anything else designed for security. Hard to beat DJB in that respect. If you left out the security requirement, I would say just use the Python SimpleHTTPServer. I think it's probably secure, but definitely not explicitly designed for it.
- dfc 13y agoI use equivs to create a virtual package that does nothing but depends/recommends/suggests other packages. I have two dfc.deb and dfc-workstation.deb, dfc-workstation adds GUI/multimedia/end-user tools that I do not need everywhere. When I get a new machine I can install these packages and all of the things I depend on will be installed. If publicfile was in debian it would be automatically installed. As it is I have to copy the package I created with checkinstall and install it manually.
- inconshreveable 13y agoI think my project srvdir might be exactly what you're looking for: https://srvdir.net https://srvdir.net
- pjc50 13y agohttp://smarden.org/pape/Debian/unofficial/why.html http://smarden.org/pape/Debian/unofficial/why.html DJB appears to have changed the license to public domain, but at some point in the past there was a license that prohibited distribution of binaries from modified source. There's still the request that the paths not be changed to comply with the FHS. DJB has strong opinions about the construction and distribution of software. So do quite a lot of debian people. These views are incompatible.
- dfc 13y agoThe page you linked to was last updated 11+ years ago. Notice the discussion of qmail|ucspi|djbdns-installer packages? They are not around anymore, you can install qmail/ucspi/daemontools etc. There is even djbdns and the debian tweaked + community patches version known as dbndns. Yes djb and debian devs are quite opinionated, but I do not think that is the reason that publicfile is not in debian despite the fact that so many other djb packages are. I think the reason is low demand largely due to the fact that gnome-desktop depends on gnome-user-share (AKA: apache).
- zimpenfish 13y agothttpd? https://packages.debian.org/search?keywords=thttpd https://packages.debian.org/search?keywords=thttpd