Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
What exactly do you need help with? I would start by installing vsftpd from the ubuntu repositories. Use either synaptic or apt-get:
Code:
# sudo apt-get install vsftpd
Once it is installed, read through the config file. that will go a long way towards explaining everything involved in setting it up, as well as explaining how the program works. Usually the config file is located at /etc/vsftpd.conf (or maybe something like /etc/vsftpd.conf.sample)
If you have any specific questions from that, post them here.
Hope this gives you a solid jumping-off point. good luck.
what directory do i place files in.
For instance, I want to have my web files in the FTP.
Web files are located all in /var/www/ so how would i set up the FTP to run in that directory only?
I have only just installed it, with no configuration of the vsftpd.conf file at all really. When I use ftp://localhost it just comes up with a blank page with the title "Index of ftp://localhost/"
with no files or folders shown. If I use nautilus and put files in the /var/ftp/ directory and restart the ftp, there still arent files shown. All I want to do is set a directory so when I log in, it brings me to that directory.
the /etc/vsftpd.conf file that came with the vsftpd package has enough information on how to configure vsftpd in most situations. In your case, you would probably be best to create a new user on your machine, set that user's home directory to /var/www and give that user ftp login permission. Make sure that the new user has read/write permissions of /var/www.
I believe that it is vsftpd's default behaviour to chroot any ftp login into that user's home directory. You can probably change that in the config file.
The default of vsftp is actually just the opposite, it doesn't chroot users unless you change the default config. Sort of odd for the security king FTP server, but that is the way it works. Of course given the permissions system, it does make some sense.
To the OP, you won't be able to upload files to /var/www until you make the changes the previous responders said. Typical users do not have write permissions for /var/www, so you will need to work with the configs of apache and vsftpd so that you have one user or group with read and write permissions for the directory where the website exists. Usually /var/www is either root:root, or www-data:www-data, which is the default owner of apache2 on most systems.
You should search here for how to chroot users in vsftpd. It is asked and answered all the time. Set the owner of the directory where the website is, make sure the permissions are square, and then also set that as their home directory. Then enable the chroot, and the site user (do NOT use your account, or you will be very sorry) should be able to upload/download files to and from the website. Also, if the site directory is owned by root:root, you'll have to change that, as root can't ftp through vsftp, because that is a major security risk.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.