Forum Moderators: phranque

Message Too Old, No Replies

Newbie managed to install Apache HTTP server

Now how do I configure FTP?

         

Adrian_H

8:34 pm on Jan 2, 2006 (gmt 0)

10+ Year Member




OK quite new to home web hosting, I have managed to get the firewall working OK, set up a Linux box, install and get Apache2 working, install a bit of script for DynamicIP but now can not ind the information to allow my to upload new web pages via ftp.

Apart for allowing port 21 what else do I need, there must be a section on Passwords or similar but unable to find.

Do I need another server as well as Apache to do the ftp or is it within the package?

Any help needed even where in the new documentation to read up as I have not found it in simple language yet.

Cheers

Adrian

encyclo

1:57 am on Jan 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums Adrian_H!

You need to install an FTP daemon such as vsftpd (my favorite) or proftpd - assuming you are using virtual hosting with each site in a user directory, then the ftpd will simply use the Linux login/password for each user. Careful to disable shell access (SSH and especially telnet) for most users (set their shell to

/bin/false
) even if you have sshd running - most users won't want/need shell access so you should restrict it to only those who ask (and who you trust). If it is only you using the server, then I would abandon FTP altogether and rely on SCP over SSH.

Leosghost

2:01 am on Jan 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



so you should restrict it to only those who ask.

lots of those who "ask" actually wont really know how to anyway ..better not to give the option til you know they know what they are doing ..you will avoid much grief that way ;)

Adrian_H

7:39 am on Jan 3, 2006 (gmt 0)

10+ Year Member



OK on the posts still a bit onused on the matter.
If I provide a bit more of an overview.

The install of Apache is on SUSE10. this is a standalone computer. The firewall am using is Smoothwall Express 2 and it works very well. The webserver is on the DMZ zone and I can access it via my green network side. The DMZ can access the Internet and the only rule I have is to allow port forwarding of port 80 to the webserver.

I have not installed any FTP server on the SUSE10 box yet, but is that what I need to do?

I then need to have a local user and use a virtual host to that user then FTP login would put me into local user directory.

It is only going to serve my own home pages on my home network so was going to leave the default www locations, if this is a bad practive then I will definatly move away from that location.

Just checking my installation options and I can install
kbear, tftp, vsftpd, or obexftp. Not sure which is the correct one to use that I have available on the installation disks to keep it simple.

Again any help appreciated.

Cheers

Adrian

marcs

7:42 am on Jan 3, 2006 (gmt 0)

10+ Year Member



I'd go with vsftpd. Set the home directory for the user(s) you grant ftp access to match the dir you want them to login to using ftp.

Adrian_H

8:30 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



Ok I said I was quite new to all this. I have installed vsftp and I am now looking through the docs to find out how to enable the service. I guess it has to be started somehow.

I can not find it in Yast or within xinetd to start so I guess I need to add a line to boot.local

Sometimes I tend to think that at least with the windows readme files it make it a bit easier.

Within Listen.conf I have
Listen 21
Listen 80

When i ftp the IP address 192.168.1.10 I do not get any login or password.

What am I missing?

Cheers

Adrian

Adrian_H

11:24 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



Quick update, I have found the vsftpd service in xinetd and set it to 'on'.

I have struggled to find much information with my distro I have printed out the vsftpd.conf file found in /etc/ and I am trying to understand it. I get the impression it should work as is?

With Apache listen.conf set for ports 21 and 80, if I ftp://192.168.1.10 would I expect to get dialog back asking for login and password. I have changed no other fields yet in Apache.

If someone could point me to a newbie guide to setting this up to serve initially only the default web access of /srv/www/index.html as it does now and then allow me ftp access to this location even if it means logging in a root I will be happy to have achieved something.

Cheers

Adrian

encyclo

11:32 pm on Jan 3, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm not sure I follow what steps you have taken... HTTP and FTP are two distinct services - Apache should be handling HTTP connections on port 80 and vsftpd should be handling FTP connections on port 21. From a remote machine, connect via FTP and vsftpd should answer: log in with your normal user account and you should end up in your home directory. If that works, then you're in business. :)

Adrian_H

11:55 pm on Jan 3, 2006 (gmt 0)

10+ Year Member



Hi encyclo;

I am/was under the impression that I had to allow the ftp service within Apache hence asking it to listen on port 21 as well as 80. Am I wrong on this should all I do is allow Listen 80 and serve htm and html pages.

If ftp is a seperate servivce and not related to apache the I am well confused on some comments about virtual servers!

I think the Sams book on Apache is in order.
.
.
.
.

I have just removed the Listen 21 directive from listen.conf to see if Apache was trying to compete with ftp.

I have shut down and restarted the computer, when I now ftp://192.168.1.10 I now get
"Index of ftp://192.168.1.10/"

No login script or password ,but it is a major step forward for me. I will stop asking questions on ftp on these pages I think as it looks as though it could be off topic.

Cheers
and thanks for the help

Adrian

Leosghost

1:30 am on Jan 4, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



I will stop asking questions on ftp on these pages I think as it looks as though it could be off topic.

Don't worry ..for the moment you are doing just fine and remember that other eyeballs than yours are watching and formulating their own questions or answers or just wondering maybe even learning etc ..thats more or less what this place has for a "raison d'etre" ..

If it's off topic it'll get moved or mentioned ..as jim did neither you are OK ..always be nice to jim however and yes "you" were ( this comment is for watchers ..this fora is cited all over the internet as "the fora" on apache )....he is unique .and modest enough to probably mod this comment out ..he should leave it .:)