FTP server for Redhat Linux 7.3????

scorpio5780

Member
Dec 19, 2001
119
0
0
Hi

I installed redhat linux 7.3 server without the FTP that comes along on the CD becos I read somewhere that it has bugs.
Which FTP server should I install? If possible can you send me the link for it.
Thanks a bunch.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
ok man, i answered your post twice...but enough is enough...there is no need to post a thread in EVERY single forum.
 

scorpio5780

Member
Dec 19, 2001
119
0
0
sorry

Sometimes I don't get response from one group. Thats why I post it in all the appropriate groups.
Thanks for the help.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
patience is a virtue, grasshopper :)

It's generally frowned upon when you cross post over several forums...just some friendly advice to keep you from getting flamed in the future.
 

scorpio5780

Member
Dec 19, 2001
119
0
0
Thanx for the advice. I'll keep that in my mind.
But currently I am facing another problem. I downloaded the proftp package and extracted it.
Before going ahead I would like to tell you that I am learning linux.
I saw the readme files and tried to run the ftpserver.
I got an error saying "nogroup" group not found.
So I searched for the solution online and found that there should be a group "nogroup" in etc/groups" file. But when I looked up into the "etc" folder I just found "group" and "group_" file but not "groups" file. Anyways I opened the "group" file and found many lines which looked like -- "ftp:x:50" .... probably for every service.

Questions:
1. Why I don't have "groups" file in "/etc" folder?
2. If "group" file is the one in which I need to add the new group then how is it done? As I am new to linux I don't understand the conten of the file -- "ftp:x:50"
3. When you extraxt the rpm package of PROFTP, does it starts automatically when system boots? If NO then how to start as other services run? What is the file that I need to change?
4. How to make users for FTP? IS there any user interface for doing that in Proftp?

I'll appreciate any kind of help.
Thanks
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
1. the name of the file is "group" not groups, or at least with my distro.
2. to add a group, you can either use the GUI user/group add tools in kde or gnome or type "groupadd [groupname]" also, by typing "man groupadd" you will be able to read an extensive help file on the command groupadd
3. it depends, there are severl ways to start proftpd, i use xinitd to start it automatically when linux boots.
4. to add users, I use an alias to an existing and local account name.

I recommend you read some of the documentation at the proftpd site to get familiar with it, otherwise it will be difficult to setup. I think there are GUI's available that act for a frontend for proftpd. Try searching freshmeat.net for proftpd and see what it spits back.

 

scorpio5780

Member
Dec 19, 2001
119
0
0
I created the user and group. Also changed the proftpd.conf file.
But Now i am gettibnng the following error -

"localhost.localdomain - failed binding to 0.0.0.0 port 21: Address already in use
localhost.localdomain - Check the ServerType directive to ensure you are configure correctly."

I tried changinbg the ServerType directive from "standalone" to "inetd" but it didn't help.
Its getting complicated.... Is it so hard to install things on Linux box??
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
Sounds like you already have something running on port 21. You need to disable whatever that is.

First figure out if you have an ftp server running already. Type "ftp 127.0.0.1" and see if it establishes and FTP connection. if it does, type "ntsysv" and it will display a list of services. Look for something that says ftp and disable it. DO NOT DISABLE anything else unless you know what you are doing. It could also be, that you already have a session of proftp running, in either case you will find out by trying to connect to the localhost.

Not everything is this hard in linux, but proftpd does take some time and patience to understand, and there is some networking understanding involved as well. Keep at it :), it wont be long before you'll get the hang of ot.

-P
 

scorpio5780

Member
Dec 19, 2001
119
0
0
Well.. just after sending the last message I checked for any FTP already running... (guess already getting hang of it..)
The service runs fine.. It starts..But when I enter username and password... I get the message "Incorrecy password".
Now I have 2 machines on redhat linux 7.3. One runnin KDE and other GNOME. I am doing things on KDE machine in traditional way and in GNOME I am installing all possible user interface for all the services.
And the same FTP problem persisits on both the machines.
I changed the password, created new users and groups. But getting the same message.
Can you tell me what all files does PROFTP uses ..like configurations files and files for passwords??
I know I am getting close.. just need couple of pushes..
Thanks again
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
the user/group you set up earlier (nobody/nobody) is the user/group that proftpd uses to run under, since its not a good idea to run ftp as root. That is not the user you connect with.

you have set up "directives" in the /etc/proftpd.conf file to tell proftpd which users are or are not allowed to log in.

In my situation i created a local linux user and group called ftpuser/ftpuser and gave it a password. I then used the "useralias" directive in the proftpd.conf file to define ftp user as follows. Lets say you wanted a user joe, in proftp.conf it would look like this:

Useralias joe ftpuser

This would creat a proftp user with username joe and the password that you originally assinged to the user ftpuser. This way, you dont have to create local users for every ftp account, you just keep adding useralias directives. The downside is that all users have the same password, but thats generally no big deal for me.

I can't stress enough that you need to read through the proftpd documentation and check out their examples, or it will be difficult to say the least. There are just too many directives to go over here.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
You also have to set directives on which users can then log in, where they can upload, download from etc..etc.
 

scorpio5780

Member
Dec 19, 2001
119
0
0
Hi there

well I tried doing things.. I am able to login to the ftp server as anonymous provided I configure User with AnonRequirePassword off setting i.e. it asks for an email address and is happy taking it. But When I keep AnonRequirePassword on and enter the user's password, it gives me error 530-Incorrect password. Well I think it is trying to read some file and not getting the access. Do you which file it looks for password?
Anyways.. following is my proftpd.conf file --- In this user "kul" works fine with the AnonRequirePassword off but when I make it "ON" it doesn't. Same with the "ftp" user.

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName " "ProFTPD Default Installation"
ServerType standalone
DefaultServer on

Port 21
Port 21
# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
UserAlias nobody ftp

# Limit the maximum number of anonymous logins
MaxClients 10

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>

</Anonymous>


<Anonymous /home/ftp>
User kul
Group kul
AnonRequirePassword off
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir directory.msg
<Limit WRITE>
DenyAll
</Limit>
<Directory /home/ftp/incoming/*>
AllowOverwrite on
<Limit STOR RETR APPE WRITE>
AllowAll
</Limit>
<Limit DELE SITE_CHMOD>
DenyAll
</Limit>
</Directory>
</Anonymous>
 

scorpio5780

Member
Dec 19, 2001
119
0
0
I read the following in the readme file and checked the "/etc/pam.d/ftpusers" configuration witht the configuration given in "readme.pam". They are same. :-(
Still can't connect...

" 7. Normal users can't login, only anon.
Check that the /etc/pam.d/ftp file exists on the system and is configured as detailed in README.PAM
"
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
you should enable logging in order to debug your access problem...add this to the main server config:
SystemLog /var/log/ftp
TransferLog /var/log/ftp.transfer
ExtendedLog /var/log/ftp.extended

Have u tried using the default proftpd.conf file to see if you can connect?
 

scorpio5780

Member
Dec 19, 2001
119
0
0
-----------------------------------------------------------------------------------------------------
"Have u tried using the default proftpd.conf file to see if you can connect? "
-------------------------------------------------------------------------------------------------------

yes..I tried that the first time... it didn;t work.

 

scorpio5780

Member
Dec 19, 2001
119
0
0
--------------------------------------------------------------------------------------------------------------------------------------
"you should enable logging in order to debug your access problem...add this to the main server config:
SystemLog /var/log/ftp
TransferLog /var/log/ftp.transfer
ExtendedLog /var/log/ftp.extended"
-----------------------------------------------------------------------------------------------------------------------------------

I am little embarassed to ask this but can u tell me main server config file in which I have to write these lines.
Sorry but I told you I am learning linux
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
No problem mate...using the conf file you posted, it will look like this.

# This is a basic ProFTPD configuration file (rename it to
# 'proftpd.conf' for actual use. It establishes a single server
# and a single anonymous login. It assumes that you have a user/group
# "nobody" and "ftp" for normal operation and anon.

ServerName " "ProFTPD Default Installation"
ServerType standalone
DefaultServer on
SystemLog /var/log/ftp
TransferLog /var/log/ftp.transfer
ExtendedLog /var/log/ftp.extended
Port 21

# Umask 022 is a good standard umask to prevent new dirs and files
# from being group and world writable.
Umask 022

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 30

# Set the user and group that the server normally runs at.
User nobody
Group nogroup

# Normally, we want files to be overwriteable.
<Directory /*>
AllowOverwrite on
</Directory>

# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
User ftp
Group ftp
# We want clients to be able to login with "anonymous" as well as "ftp"
UserAlias anonymous ftp
UserAlias nobody ftp

# Limit the maximum number of anonymous logins
MaxClients 10

# We want 'welcome.msg' displayed at login, and '.message' displayed
# in each newly chdired directory.
DisplayLogin welcome.msg
DisplayFirstChdir .message

# Limit WRITE everywhere in the anonymous chroot
<Limit WRITE>
DenyAll
</Limit>

</Anonymous>


<Anonymous /home/ftp>
User kul
Group kul
AnonRequirePassword off
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir directory.msg
<Limit WRITE>
DenyAll
</Limit>
<Directory /home/ftp/incoming/*>
AllowOverwrite on
<Limit STOR RETR APPE WRITE>
AllowAll
</Limit>
<Limit DELE SITE_CHMOD>
DenyAll
</Limit>
</Directory>
</Anonymous>
 

scorpio5780

Member
Dec 19, 2001
119
0
0
Thanks for understanding my situation
I tried what u send but still only anonymous user are able to login but not authenticated users who have ftp accounts.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
ok, so YOU can log in as anonymous now? the reason that normal users cant is, well, because if you look at your conf file you have set up an anonymou server. i will post a snippet of a non-anonymous ftp server conf file when i get to work.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
Here is a simple conf file that shoud get you started. It assumes that you have created a user 'xxx' in group 'yyy' and give it a password using passwd xxx. It also assumes that you have the following directories on your box...
/ftp/uploads
/ftp/downloads

This is of course a very simple conf file and there are a ton of things you can still do such as resume uplads/downloads, welcome messages etc...but this should be enough to get you started. Once you have created user xxx in group yyy, you can use the UserAlias directive to assign ftp usernames that people will use to log in with, using the password for user xxx. All ftp users will have the same password this way. Another option is to set up local users for every ftp users, but in my opion that can become a pain in the ass to manage.

You'll notice this in the conf file:


# Limit login to xxx users
<limit LOGIN>
Order allow, deny
AllowUser xxx
DenyAll
</limit>


# Limit login to only yyy group
<limit LOGIN>
Order allow, deny
AllowGroup yyy
DenyAll
</limit>


This limit directive ensures that only user xxx in group yyy can log in. The rest of the conf file is pretty well self evident. Make sure that you have set the system permission correctly on all your ftp directories. The last thing I can encourage you to do is read read read the manuals for everything and/or use the man pages on your linux box. the more you try things through trial and error, the better understanding you will gain. Also, google.com is your best friend :) Good luck!

#### Main FTP Server Config ####
ServerIdent on "FTP Ready"
ServerName "FTP Server"
ServerType standalone
SystemLog /var/log/ftp
TransferLog /var/log/ftp.transfer
ExtendedLog /var/log/ftp.extended
Port 21
Umask 022
User nobody
Group nobody
DefaultServer on

# To prevent DoS attacks, set the maximum number of child processes
# to 30. If you need to allow more than 30 concurrent connections
# at once, simply increase this value. Note that this ONLY works
# in standalone mode, in inetd mode you should use an inetd server
# that allows you to limit maximum number of processes per service
# (such as xinetd)
MaxInstances 10

# Limit login to xxx users
<limit LOGIN>
Order allow, deny
AllowUser xxx
DenyAll
</limit>

# Limit login to only yyy group
<limit LOGIN>
Order allow, deny
AllowGroup yyy
DenyAll
</limit>

# Set Usernames and alias to system user
UserAlias 'username' xxx
UserAlias 'username' xxx
UserAlias 'username' xxx
UserAlias 'username' xxx
UserAlias 'username' xxx
UserAlias 'username' xxx

# set root dir
# turn off requirement for a valid shell
DefaultRoot /ftp/
RequireValidShell off

# DOWNLOAD DIR Users can download, but not upload or create
<Directory /ftp/downloads/*>
<Limit READ>
AllowAll
</Limit>
<Limit APPE DELE MKD RMD RNTO RNFR STOR XMKD XRMD>
DenyAll
</Limit>
</Directory>


# UPLOAD DIR Users can create dir, upload and append;
# cannot download, remove/delete, or rename
# change group of all uploaded files to ftp
<Directory /ftp/uploads/*>
AllowOverwrite on
<Limit APPE STOR MKD XMKD>
AllowAll
</Limit>
<Limit READ RMD DELE RNTO RNFR XRMD>
DenyAll
</Limit>
</Directory>

#### End Main Server config ####


 

scorpio5780

Member
Dec 19, 2001
119
0
0
hey thanks a lot...
The server is up and running with the script you sent.
I just came back from my plumtree portal training week and tried the script you sent.
And the baby satrted taking usernames and passwords.
ok.. now 1 last thing... If I make Useraliases.... say
Useralias 'abc123' xxx
Do I need to make user "abc123" in the linux box? cos I just tried without making any user abc123 and that didn't work.
Anyways I'll go thru the manual.
Thanks a million for ur help.
 

Need4Speed

Diamond Member
Dec 27, 1999
5,383
0
0
Do I need to make user "abc123" in the linux box? cos I just tried without making any user abc123 and that didn't work.

No, user abc123 is not a real linux box user. user xxx is real user that abc123 is bound too.