LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   trying to set up an ftp server on RedHat Fedora 6.x (https://www.linuxquestions.org/questions/linux-newbie-8/trying-to-set-up-an-ftp-server-on-redhat-fedora-6-x-644267/)

edzillion 05-23-2008 06:39 AM

trying to set up an ftp server on RedHat Fedora 6.x
 
Just got a dedicated server, and installed ProFTPD Server on it
The thing is, I dont want to set up the domain on this new server till I know what is going on.
I tried accessing the ftp via
ftp://192.168.1.1/ (ip address changed of course)
and I am getting nothing.

I suppose I need to change the settings?
I looked in the firewall settings and found that there was no entry for port 21. So I added the line:

Accept If protocol is TCP and source is [my ip here] and destination port is 21

Any help or pointers would be much appreciated.
Ed

btmiller 05-24-2008 03:02 PM

Did you restart the firewall after changing the ruleset? That syntax doesn't look like iptables to me (maybe some funny Red Hat config syntax). If you do "iptables -L" is your new rule shown?

Are you using active or passive FTP to connect? If in active mode you must make sure that the server can open a connection for the data channel back to the client. If passive mode, the client must also be able to connect to the FTP server's passive mode port range (remember, FTP requires two TCP connections, one for control (port 21) and one for data). The passive mode port range should be defined in the ProFTPD config file, but it's been awhile since I played around with it. You'll need to make sure these ports are allowed through the firewall as well. It's generally recommended to use passive mode FTP (in case the client is behind a NAT or has a firewall on), but this is a decision made by the client, not the server.

jcvlz 05-24-2008 03:09 PM

In no particular order:
- Is the proftpd running?
- Check your config in proftpd.conf
- Where did you try ftp-ing from? the server or your local machine?
-- Try ftping from the server to itself on the looppack interface (lo) 127.0.0.1
- What's your output for "sudo iptables -L" ?

chrism01 05-24-2008 07:35 PM

Just FYI, if you are just starting out, know that FC6 is no longer supported (as in no more updates), F9 is just out, F8 is supported (and F7 ?).

btmiller 05-24-2008 08:11 PM

Fedora usually only supports the last two releases, so I believe F7 is no longer supported. This is an important point, as it means no new security patches are being made for Fedora 6. If you want a long term supported distribution and like the Red Hat way of doing stuff, I highly recommend CentOS.

edzillion 05-26-2008 04:48 AM

@chrism01
Actually its Fedora 8, and it has just been installed. What is the usual release schedule? I dont want to end up being redundant too quickly.

iptables -L:
ACCEPT tcp -- anywhere anywhere tcp dpt:ftp state NEW

so the port is open, and if I try ftp 127.0.0.1 I get Connection Refused.
There is no heading for PassivePort in the ProtFTPD conf file, and in the configuration options PASV port range is set to default.
What is the default range? I can't find any mention of it. I presume I need to add another line to the firewall to handle these ports.

edzillion 05-26-2008 11:28 AM

Ok I hadn't started the service.
LQ Newbie indeed.

thought the service would be started automatically (i guess that is xinetd).
So I started the service and tried to log in using my ftp client, but now I am getting a password error:

Response:220 FTP Server ready.
Command:USER root
Response:331 Password required for root
Command:PASS ********
Response:530 Login incorrect.
Error:Could not connect to server

I thought the root password would be the same as the login root password, or is something else happening here?

chrism01 05-26-2008 06:21 PM

Release schedules: http://fedoraproject.org/wiki/Releas...ricalSchedules

edzillion 05-27-2008 10:47 AM

So after doing some more reading I realise I shouldn't be trying to log into ftp with root.
I have set up a new user, but it can't log in to ftp either.
Checked the denied ftp users in webmin and my new user is not listed.
I gather that a user's login for ftp should not be the same as their system login, due to the fact that if a security breach in the ftp program allowed a user to access the command line they would have privledges to do quite a bit of damage. I suppose this is why webmin has options to set username aliases (?)

Obviously I have more reading to do, but some pointers would be appreciated.

Regards
Ed

Gerry Danen 05-28-2008 10:53 AM

Quote:

Originally Posted by edzillion (Post 3165096)
Ok I hadn't started the service.
thought the service would be started automatically (i guess that is xinetd).
So I started the service and tried to log in using my ftp client, but now I am getting a password error:

How did you start the service, Ed? I try service start proftpd and get unrecognized service...

chrism01 05-28-2008 07:10 PM

You probably don't have proftpd installed.

In re xinetd, there are 2 ways to run a service ;
1. for high frequency usage, run it direct, so
service start <servicename>

2. for low freq usage, use the xinetd meta-daemon/service.
This runs all the time, but doesn't provide a service itself. Instead, it manages other services/daemons eg if you
ls /etc/xinetd.d

chargen cvs echo rsync services tftp vnc
chargen-udp daytime echo-udp sane-port swat time vsftpd
cups-lpd daytime-udp netstat servers systat time-udp

each of which is a file describing whether to manage that service, and how.

HTH
PS tutorial: http://www.cyberciti.biz/faq/linux-h...inetd-service/


All times are GMT -5. The time now is 11:11 PM.