LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2003, 12:11 AM   #1
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Rep: Reputation: 30
proftpd Fatal Error on start


I'm running Apache as a web server, and I just installed and configured proftpd so that I can control who uploads things to my computer. When I start the service (/usr/local/etc/proftpd.conf - I installed as user) it gives me
Code:
       - Fatal: DefaultServer: DefaultServer has already been set.
The first section of the configuration file looks like this:
Code:
    ServerName			"ProFTPD Default Installation"
ServerType			standalone
DefaultServer			on

# Port 21 is the standard FTP port.
Port				21

etc...
What am I doing wrong? Should I be setting something somewhere else?

And on a similar note, how do I create users with access rights for the FTP service? i.e. I know I set the service to run under my username, but is there a setting (I couldn't find one) to list usernames and passwords, along with permissions just for proftpd?

Thanks very much,
Laura
 
Old 04-02-2003, 01:13 AM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
ProFTPD should be run as user/group nobody. It's better for security.

Second: Maybe it's already running, if so, either kill the server (check with ps -aux) and then restart, or simply restart.

As for users, it uses the regular users on your system. So create them as you would any user, simply give them less priviledges than you would a user on your system, such as use rbash as their default shell, confine then with DefaultRoot and so on.



For more info on things I've mentioned either post back (I'll be glad to clarify) or search this site, proftpd is actually covered quite well here.

Cool
 
Old 04-02-2003, 02:05 PM   #3
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
No, it's not running already, and I get the same error message when I try restarting it.
How do I confine users with DefaultRoot? I assume that's the setting mentioned in the proftpd.conf file. I have it set to one folder - the one I want to be common to all users' uploads, which is fine. However, does making that their default root folder actually confine them there, or just make that the starting point? I really don't want them anywhere else in my system.
thanks!
~Laura
 
Old 04-02-2003, 06:48 PM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
If your DefaultRoot looks like this in your proftpd.conf file:
DefaultRoot ~

Then they will be confined to their home directory and all subdir. If it looks like:
DefaultRoot /var/www/ftpuploads

Then they will be confined there. I'd also change their home directory in /etc/passwd or /etc/shadow (depending on what you are using) to the home of which you want them confined, then if they try to access another directory with something like ssh then, assuming you are using rbash or something similar, they will be confined there as well.

Check your inetd/xinetd settings to see if you already have an FTP server defined and/or running that you don't want. Something like wu-ftp or whatever might have already been installed and setup, and maybe this will show you.

Cool
 
Old 04-02-2003, 08:31 PM   #5
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Slight misunderstanding here, I think....I don't want them each confined to their home directory...Id' rather they didn't even have one. I want each user to be able to upload things via ftp to one directory on my hard drive, i.e. /var/www/Uploads. I want them all have access to this directory, and none other (not even ~).
 
Old 04-03-2003, 08:30 AM   #6
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Then that's fine, just use the specific DefaultRoot:
DefaultRoot /var/www/Uploads

The other option I was referring to was in case you wanted them to be confined there, and others (maybe anonymous or yourself) to start in a home directory of some sort. In that case you should set the DefaultRoot to ~ (which means home directory) and then edit their home directories in /etc/passwd to reflect /var/www/Uploads then that's where they will start. Either way should work, it just depends on what 'else' you might be doing with ftp that should determine which method you use.

Cool
 
Old 04-03-2003, 09:53 AM   #7
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Ah, I see. Sorry about the misunderstanding

About that "Default Server" error...poring through the posts and FAQs makes me think that Apache and proFTPD are fighting for control of the DefaultServer title... someone else has posted his proftpd.conf file (http://www.linuxquestions.org/questi...threadid=33724)
and they have 'ServerType inetd'...does that just mean that xinetd starts the server on startup?...I've only got a vague idea of what I'm groping towards here, sorry, but what I'm trying to say is: What sets the Default Server? And how can I change it so that I can have more than one server running at the same time (i.e. Apache and proFTPD)?

Last edited by rose_bud4201; 04-03-2003 at 09:55 AM.
 
Old 04-03-2003, 09:56 AM   #8
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
...And if xinetd is supposed to start the ftp server, as the proFTPD FAQ seemed to suggest, how do I go about telling xinetd that it should do that??
 
Old 04-03-2003, 07:47 PM   #9
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Post it up. xinetd or inetd are dependant upon which distro you are using. If you look at the files themselves, usually you can suss out what part you need to edit to work with your FTP server. For example, mine:
Code:
# File Transfer Protocol (FTP) server:
ftp     stream  tcp     nowait  root    /usr/sbin/tcpd  proftpd
That's an exerpt from Slack 8.1 /etc/inetd.conf



Cool
 
Old 04-03-2003, 08:02 PM   #10
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
bother.
/etc/inetd.conf doesn't exist (in fact, it doesn't exist anywhere on the system) and although xinetd.conf does, all it has in it is this:
Code:
  #
# Simple configuration file for xinetd
#
# Some defaults, and include /etc/xinetd.d/

defaults
{
        instances               = 60
        log_type                = SYSLOG authpriv
        log_on_success		= HOST PID
        log_on_failure		= HOST
	cps			= 25 30
}

includedir /etc/xinetd.d
.......this is very odd.
 
Old 04-03-2003, 08:38 PM   #11
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
Assuming your sidebar info is correct, check the Mandrake Control Center for info on what services are started up, and there might even be an option there to set "defaults". Although....

IF ps -aux (as root) isn't returning anything "FTP looking" then I'd suspect something else might be going on, check that first and let me know what you think. I'll start thinking outside this box if that's the case

Cool
 
Old 04-03-2003, 10:26 PM   #12
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
AAAAARGH...I'm positive that I'm making this harder than it should be.
I got proFTPD started by commenting out the line about DefaultServer, and it didn't seem to complain. However, I couldn't actually connect and see a directory listing (either with an ftp client or my browser). Once the username/password dialog popped up, but after I entered them it just sat there 'waiting for response'.
I uninstalled proFTPD, and installed vsftpd...it instills itself in xinetd, and I've restarted xinetd each time I change the config file. Even with the default configuration (ftp://vsftpd.beasts.org/users/cevans...TE/vsftpd.conf) I get the same thing, though...a client or browser just sits there and tries to connect.
All I should have to do is ftp://myip:21, correct?? Or what else do I have to enable??
 
Old 04-03-2003, 10:34 PM   #13
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
Update:
from the commandline,
Code:
     ftp localhost.localdomain
works just fine! It asks me for a username and password, and enters ftp mode perfectly.
What reasons could there be for it not working through a client, though? I can't even think how to explain ftp commands to some of the users for this thing :-/
 
Old 04-03-2003, 11:01 PM   #14
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
yeah...hmmmmmmm......127.0.0.1 works fine, but the actual IP returns "no Server available to handle request on <myhostname.mydomain>"

netstat -l gives me:
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:32768 *:* LISTEN
tcp 0 0 *:6753 *:* LISTEN
tcp 0 0 localhost.localdo:45549 *:* LISTEN
tcp 0 0 *:sunrpc *:* LISTEN
tcp 0 0 *:x11 *:* LISTEN
tcp 0 0 *:ftp *:* LISTEN
tcp 0 0 *:ipp *:* LISTEN
udp 0 0 *:32768 *:*
udp 0 0 *:sunrpc *:*
udp 0 0 *:631 *:*
Active UNIX domain sockets (only servers)
Proto RefCnt Flags Type State I-Node Path
unix 2 [ ACC ] STREAM LISTENING 3370 /tmp/.font-unix/fs-1
unix 2 [ ACC ] STREAM LISTENING 4989 /tmp/.X11-unix/X0
unix 2 [ ACC ] STREAM LISTENING 352820 /tmp/gaim_laura.24235
unix 2 [ ACC ] STREAM LISTENING 3242 /dev/gpmctl


So I know it's listening. Why it's not responding, though, is the mystery.

Last edited by rose_bud4201; 04-03-2003 at 11:08 PM.
 
Old 04-04-2003, 12:11 AM   #15
rose_bud4201
Member
 
Registered: Aug 2002
Location: St Louis, MO
Distribution: Xubuntu, RHEL, Solaris 10
Posts: 929

Original Poster
Rep: Reputation: 30
ok, progress:
Connecting over port 20 (what vsftp listens over (?!), according to the config file) gives me "Connection refused."

Using 2 terminals, I tried this:
Terminal 1: nc -l -p 20 128.226.198.93 20

Terminal 2: ftp 128.226.198.93 20

Terminal 1: nc -l -p 20 128.226.198.93 20
invalid connection to [128.226.198.93] from (UNKNOWN) [128.226.198.93] 46801

What else is there besides a firewall (iptables is stopped) that could block port 20??

Last edited by rose_bud4201; 04-04-2003 at 12:49 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
X-server fatal error,KDM refused to start callitdctr Linux - Software 3 07-01-2005 08:46 AM
Start Fresh, but still that EVIL FATAL ERROR TheMadAd19 Linux - Newbie 1 02-27-2005 03:51 PM
Fatal Error, Cant Start X Using SuSE 9.1! Please Help! DozenEggs Linux - Newbie 1 07-24-2004 01:57 PM
XIO: fatal IO error 104. X server would not start after problem with Vmware noodle_mee Linux - Newbie 0 07-07-2004 10:48 PM
Upgraded to new kernel via redhat network and cannot start X. Fatal Server Error. Gen13 Red Hat 5 10-25-2003 12:09 AM


All times are GMT -5. The time now is 06:23 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration