LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 08-12-2004, 04:08 PM   #1
gplacek
Member
 
Registered: Aug 2004
Location: Atlanta
Distribution: Slackware
Posts: 56

Rep: Reputation: 15
Question proftpd. FTP login problem..


Hello good people.

I have been trying to get my proftpd server running for a while now. The problem seems to be that it is running, but I cant log in. I get this when I try to ftp into my server from a console.

[root@xx-xxx-xxx-xxx home]# ftp xx.xxx.xxx.xxx
Connected to xx.xxx.xxx.xxx (xx.xxx.xxx.xxx).
220 ProFTPD 1.2.10rc1 Server (Blackula FTP) [xx-xxx-xxx-xxx.cpe.ga.charter.com]
Name (xx.xxx.xxx.xxx:greg): cencen
331 Password required for cencen.
Password:
530 Login incorrect.
Login failed.
421 Service not available, remote server has closed connection
ftp> exit

So, I know that the server is accepting connections (and I also downloaded gproftpd and watched the connection come in get denied for lack of correct passwd) but I know the passwd is correct.
Here is a portion of my /etc/passwd file. I also tried with /bin/bash. No luck. I think that gproftpd is making things more complicated for me.

cencen:x:501:501:ftp-user:/home/ftp/GProftpdNoDir:/bin/false
anyone:x:502:502:ftp-user:/home/ftp/GProftpdNoDir:/bin/false

Here might be the problem. I have two proftpd.conf files. I'm not sure which one is being used. I know that one of them is an example with lines commented out, (thats the one I thought I was using) , but after I installed Gproftpd, I think it created the second one. If anyone can help tell me what is wrong, that would be great. I was using a dir /home/ftp as the home dir of the ftp users but gproftp seemed to change that also. I got the same login problem when I did that, before I installed gproftpd. I dont think I really need gproftpd, I just think I have mucked up my permissions or the group. Not really sure. If you want to drop me a line and let me know where you think I should start to solve this problem please let me know. Thanks. :-) After I search forums and google my browser to death, I can almost always find a solution to my linux problems here.. thanks guys.

gplacek (blackula)
fedora core 1


1. (/etc/proftpd.conf)

# 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 "Blackula FTP"
ServerType standalone
DefaultServer on

# Port 21 is the standard FTP port.
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 under which the server will run.
User ftp
Group ftp

# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~

# Normally, we want files to be overwriteable.
AllowOverwrite on

# Bar use of SITE CHMOD by default
<Limit SITE_CHMOD>
DenyAll
</Limit>

# 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>



2. (/usr/local/etc/proftp.conf)

ServerType standalone
DefaultServer on
Umask 022
ServerName "68.117.216.152"
ServerIdent on "My FTPD"
Bind "68.117.216.152"
ServerAdmin Admin@this.domain.topdomain
IdentLookups off
UseReverseDNS off
Port 21
PassivePorts 49152 65534
#MasqueradeAddress None
TimesGMT off
MaxInstances 30
MaxLoginAttempts 3
TimeoutLogin 300
TimeoutNoTransfer 120
TimeoutIdle 120
User nobody
Group nobody
DirFakeUser off nobody
DirFakeGroup off nobody
DefaultTransferMode binary
AllowForeignAddress on
AllowRetrieveRestart on
AllowStoreRestart on
DeleteAbortedStores off
TransferRate RETR 30
TransferRate STOR 40
TransferRate STOU 40
TransferRate APPE 40
SystemLog /usr/local/var/log/secure
#gp_random_username_length 6
#gp_random_password_length 6
#gp_randomize_case lower
#gp_useradd_root_path /home/ftp
#gp_useradd_upload_path /upload
#gp_html_path /usr/local/var/www/ftp.html
#gp_welcome_name welcome.msg
<IfModule mod_tls.c>
TLSEngine off
TLSRequired off
TLSVerifyClient off
TLSProtocol TLSv1
TLSLog /usr/local/var/log/proftpd_tls.log
TLSRSACertificateFile /etc/gproftpd/gproftpd.pem
</IfModule>
<Limit LOGIN>
AllowUser anyone
AllowUser cencen
DenyALL
</Limit>

<Anonymous /home/ftp>
User anyone
Group anyone
AnonRequirePassword on
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir .msg
AllowOverwrite off
<Limit LOGIN>
Allow from all
Deny from all
</Limit>
<Limit ROOT_DIR_ALLOW RETR LIST NLST MDTM SIZE STAT CWD XCWD PWD XPWD CDUP XCUP>
AllowAll
</Limit>
<Limit ROOT_DIR_DENY DELE APPE STOR STOU SITE_CHMOD SITE_CHGRP RNFR RNTO MKD XMKD RMD XRMD>
DenyAll
</Limit>
</Anonymous>

<Anonymous /home/ftp>
User cencen
Group ftp
AnonRequirePassword off
MaxClients 3 "The server is full, hosting %m users"
DisplayLogin welcome.msg
DisplayFirstChdir .msg
AllowOverwrite off
<Limit LOGIN>
Allow from all
Deny from all
</Limit>
<Limit ROOT_DIR_ALLOW RETR LIST NLST MDTM SIZE STAT CWD XCWD PWD XPWD CDUP XCUP>
AllowAll
</Limit>
<Limit ROOT_DIR_DENY DELE APPE STOR STOU SITE_CHMOD SITE_CHGRP RNFR RNTO MKD XMKD RMD XRMD>
DenyAll
</Limit>
<Directory /home/ftp/ftp/upload/*>
AllowOverwrite on
<Limit UPLOAD_DIR_ALLOW LIST NLST STOR STOU APPE RETR MKD XMKD STAT MDTM PWD XPWD SIZE CWD XCWD CDUP XCUP SITE >
AllowAll
</Limit>
<Limit UPLOAD_DIR_DENY RNFR RNTO DELE RMD XRMD SITE_CHMOD SITE_CHGRP >
DenyAll
</Limit>
</Directory>
</Anonymous>
 
Old 08-12-2004, 04:52 PM   #2
xPAGANx
LQ Newbie
 
Registered: Aug 2004
Location: Warren, MI
Distribution: Slackware 10
Posts: 7

Rep: Reputation: 0
Alright I only read the first few lines... Here is my suggestion...

1. Download webmin from webmin.com
2. Install it
3. Use webmin via a browser to configure proftpd.

a thing to note... make sure your proftpd group is in the user's groups.

Let me know how it goes.

xPAGANx

Last edited by xPAGANx; 08-13-2004 at 08:39 AM.
 
Old 11-23-2004, 04:46 AM   #3
againstms
Member
 
Registered: Nov 2004
Location: Pretoria South Africa
Distribution: Fedora Core 2
Posts: 74

Rep: Reputation: 15
Thumbs up

I had the exact same problem and this is what solved mine:

Make sure the user exist in gproftp and change the password, onc password changed select apply so that your changes are saved.........make sure they are part of a groupd that has access rights, I just used the default from gproftp..........

O and make sure you are not behind a firewall that doesn't allow FTP, took me a day or two to figure that one out.............

I hope the above helps you because I myself is desperatly busy tring to find some hlep with more indepth config to make sure it is secure and as fast as possible.........
 
Old 11-24-2004, 05:52 AM   #4
againstms
Member
 
Registered: Nov 2004
Location: Pretoria South Africa
Distribution: Fedora Core 2
Posts: 74

Rep: Reputation: 15
Did you ever find a solutin to your problem because I sit with the same issue now although it was working yetserday???
 
Old 11-29-2004, 10:26 AM   #5
takatam
LQ Newbie
 
Registered: Apr 2004
Location: Zürich, Switzerland
Posts: 17

Rep: Reputation: 0
user shell

i'm no expert on this but i had a similar problem. i then found this was caused if the used did not have write access to the default login directory. in this case i would suspect that your user does not have a shell, that is the account is disabled. this definitely would block ftp access on my mandrake proftp server.

in /etc/passwd, try changing the lines to

cencen:x:501:501:ftp-user:/home/ftp/GProftpdNoDir:/bin/bash
anyone:x:502:502:ftp-user:/home/ftp/GProftpdNoDir:/bin/bash

or any other shell that other processes might have.

hope this helps,

T
 
Old 12-09-2004, 07:29 AM   #6
steepslope
LQ Newbie
 
Registered: Dec 2004
Posts: 1

Rep: Reputation: 0
New versions of gproftpd seems to work out of the box but i had this problem a long time ago.

Solution:
Make sure the line /bin/false is in /etc/shells
Add group nobody: groupadd nobody
Add user nobody : useradd nobody -g nobody -s /bin/false
(/bin/false is a restricted shell, do NOT add this user with say /bin/bash)

FTP requires some open ports in the firewall:
Ports 20, 21, and some additional higher ports to use passive ftp mode:
49152-65534 (most FTP clients can turn this off).

Check this on both on the client side and the ftp server side.

This application almost makes things too easy
It also adds alot of security things you dont have time with when editing
proftpd.conf by hand. Awsome stuff!
 
  


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
proftpd problem,can't login,ERROR:> Timeout (60000 ms) occurred on receivin singying304 Linux - Networking 1 08-12-2005 11:14 PM
proftpd configuration / login in problem mickeyren Linux - Software 6 03-01-2005 12:47 PM
Proftpd and anonymous login problem from localhost. immer Linux - Networking 0 12-12-2004 07:36 AM
Login problem with Proftpd phatboyz Linux - Software 0 08-30-2004 12:44 PM
FTP Login Problem CanadianPenguin Linux - Networking 3 10-18-2003 06:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:56 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