0

How to set-up an ubuntu machine as a file server? I already saw the steps to host a page using ubuntu(with apache2) but I want to be able to save my file and give the direct link of the file for downloading. Any ideas? Or is there any other easy way to allow hosting of a file?

Thanks

user489152
  • 907
  • 1
  • 23
  • 42
  • 2
    This is not a real question. We don't know what is the best for you and your environment (in part because you didn't tell us anything about that). Please make your question more specific. Also check the FAQ about the kind of questions that are suitable here. – Holger Just Jul 12 '11 at 13:42
  • @Holder: OOps. Guess I have to re-word it. I wanted to know how to build a file server. Anything else is "not-useful" information. I shall edit my question. Thanks – user489152 Jul 12 '11 at 14:59

1 Answers1

3

If you just want to serve files for testing then

python -m SimpleHTTPServer &

Will make the current directory available as http://localhost:8000/whatever. Obviously this isn't secure, but if you just want to share files over a network you control (you can replace localhost with the name of the machine) then it's a quick way to do it.

Jeff Foster
  • 43,770
  • 11
  • 86
  • 103
  • Wow, this is actually very useful. Thanks! – Mr. Shickadance Jul 12 '11 at 15:14
  • I have a system in the same subnet and which can do a ping on it too but this system is unable to connect(it keeps waiting to connect) to this http://localIP:8000/... Is there a fix? – user489152 Jul 12 '11 at 15:25
  • Here is the link to the tutorial:http://www.linuxjournal.com/content/tech-tip-really-simple-http-server-python – user489152 Jul 12 '11 at 15:29
  • @user489152 Are you sure that it is running without error on the remote host? – Mr. Shickadance Jul 12 '11 at 15:34
  • I tried to change IP address to my local subnet IP in BaseHTTPServer.py. But although I see that it is beeing hosted from this IP, I still cannot call it from the browser. It always says waiting to connect :( – user489152 Jul 12 '11 at 15:50