LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 05-23-2008, 06:39 AM   #1
edzillion
LQ Newbie
 
Registered: May 2008
Distribution: Redhat Linux Fedora 8
Posts: 10

Rep: Reputation: 0
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
 
Old 05-24-2008, 03:02 PM   #2
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 05-24-2008, 03:09 PM   #3
jcvlz
LQ Newbie
 
Registered: May 2008
Posts: 14

Rep: Reputation: 0
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" ?
 
Old 05-24-2008, 07:35 PM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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 ?).
 
Old 05-24-2008, 08:11 PM   #5
btmiller
Senior Member
 
Registered: May 2004
Location: In the DC 'burbs
Distribution: Arch, Scientific Linux, Debian, Ubuntu
Posts: 4,290

Rep: Reputation: 378Reputation: 378Reputation: 378Reputation: 378
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.
 
Old 05-26-2008, 04:48 AM   #6
edzillion
LQ Newbie
 
Registered: May 2008
Distribution: Redhat Linux Fedora 8
Posts: 10

Original Poster
Rep: Reputation: 0
@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.
 
Old 05-26-2008, 11:28 AM   #7
edzillion
LQ Newbie
 
Registered: May 2008
Distribution: Redhat Linux Fedora 8
Posts: 10

Original Poster
Rep: Reputation: 0
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?
 
Old 05-26-2008, 06:21 PM   #8
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Release schedules: http://fedoraproject.org/wiki/Releas...ricalSchedules
 
Old 05-27-2008, 10:47 AM   #9
edzillion
LQ Newbie
 
Registered: May 2008
Distribution: Redhat Linux Fedora 8
Posts: 10

Original Poster
Rep: Reputation: 0
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
 
Old 05-28-2008, 10:53 AM   #10
Gerry Danen
LQ Newbie
 
Registered: May 2008
Location: Edmonton
Distribution: RedHat
Posts: 3

Rep: Reputation: 0
Quote:
Originally Posted by edzillion View Post
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...
 
Old 05-28-2008, 07:10 PM   #11
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
set up ftp server shane200_ SUSE / openSUSE 3 07-02-2005 12:00 AM
How do I set my FTP server to accept passive FTP? imsam Linux - Newbie 3 12-12-2004 06:22 AM
I want to set up a ftp server. brynjarh Linux - Newbie 5 06-26-2004 12:45 PM
How to set up ftp server scialom Linux - Software 9 07-24-2003 05:04 AM
ftp server - how do I set it up? chapzilla Linux - Newbie 3 06-28-2003 07:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration