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?
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...
I wanted to get something similar to a trick of quickly starting HTTP server
which I use to download (not upload) files, i.e. I wanted something like this but for FTP server
I ended up with
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
You can use vsftpd to set up a local FTP server. Install it using
Configuration
In your case, you'll have to update the config to allow users to log in to their home directories, by adding/uncommenting the following lines in
/etc/vsftpd.conf
:Next, you will need to create a new user, setting the home directory to the your web root:
Restart the
vsftpd
server to use the updated settings:Now, you should be able to log in and modify files in
/var/www/html
by logging in using the username/password of the user you just created.Disabling the system
As a side-effect, the current setup also allows any system user to sign in via FTP using their username and password, which is a potential security risk. You can probably edit
/etc/vsftpd.conf
to fine-tune these permissions (I don't know it well enough to instruct you).However, I would suggest disabling the vsftpd server when you are not using. This can be done with the following command:
This will prevent vsftpd from starting automatically on boot. You can then manually start it using
and stop it again when you're done using it
This will stop the vsftpd server and disable all FTP connections until you start it again.