How do I set up FTP on localhost?
Solution 1
Well, I was just trying to do this exact same thing...
I looked it up on Youtube, he explains how to do it with a GUI. It is basically the same thing with a CLI, if that's what you are using, just all with text- obviously.
Here is part one editing the .conf file for vsftpd:
Configuring FTP in Ubuntu - Part 1
And part two, where he finishes adding permissions and access control:
Configuring FTP in Ubuntu - Part 2
Best of luck...
Solution 2
I wanted to get something similar to a trick of quickly starting HTTP server
python -m SimpleHTTPServer
which I use to download (not upload) files, i.e. I wanted something like this but for FTP server
- no security concerns about my network (e.g. localhost)
- no or minimal installation
- no configuration, like creating users, etc.
- no system-wide registration, I need this ftpd only once
- quickly start server and serve for the current path
I ended up with
sudo pip install pysendfile
sudo pip install git+git://github.com/giampaolo/pyftpdlib
wget https://raw.githubusercontent.com/giampaolo/pyftpdlib/master/demo/unix_ftpd.py
sudo /usr/bin/python unix_ftpd.py
Your working folder should be the one to serve into. Tip: checkout on github there are more demos with other/no authorization handlers. Performance wise this python based server is not that bad if compared to vsftpd
Related videos on Youtube
Comments
-
JohnB over 1 year
On my old machine (back on Lucid!) I used XAMPP for local dev work. XAMPP installed everything for you, including setting up FTP to your localhost (/var/www) directory, since permissions don't allow you to write directly to it.
I have a new machine running Precise, and decided to do things the grown-up way. I installed everything using tasksel, and got apache, php, mysql, and phpmyadmin up and running. But it's kind of a pain to have to create and edit all my files via gksudo gedit on the command line, and sooner or later I'm going to have to upload images.
How can I set up FTP so that I can "upload" files to my localhost server?
Edit to add
Followed the first video, but when I got to the point where he was creating files (around 7:25 in), I get hung up. Here's what my terminal looks like when I try to get into the /srv directory (which I verified does exist in Nautilus):
What do I need to do to get past this?
-
JohnB almost 12 yearsThanks for the links. I followed the process to the letter, but got hung up around 7:26 in the first video - where he goes into the /srv folder to create files for testing. When I try that, it asks me for a password, which I obviously don't have since we haven't gotten to the point of creating accounts yet. (And yes, I did enable anonymous access in the .conf file.) Any idea why that's happening or how to get past it?
-
Enigmatic over 11 yearsThat one I'm not to sure about. I just know that the video worked for me. Sorry. :/
-
V. Sareen over 10 yearsubuntuforums.org/showthread.php?t=518293 here's a non video
-
Yauhen Yakimovich almost 10 yearsnote that the demo i downloaded does no jailroot to the working directory.. but gives access to the whole root fs