View Full Version : ftp - could not retrieve directory listing
torusturtle
29th August 2006, 15:16
Hi
When using filezilla I can log in to a domain but when filezilla uses the list command I get the error
Error: Transfer channel can't be opened. Reason: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
Error: Could not retrieve directory listing
netstat -tap
gives the following:
tcp 1 0 domain.tld:ftp xxx.xx.xxx.xx:54522 CLOSE_WAIT 19722/proftpd: web1
tcp 1 0 domain.tld:ftp xxx.xx.xxx.xx:54434 CLOSE_WAIT 18354/proftpd: web1
tcp 1 0 domain.tld:ftp xxx.xx.xxx.xx:54919 CLOSE_WAIT 29897/proftpd: web1
tcp 1 1 domain.tld:ftp xxx.xx.xxx.xx:54167 LAST_ACK -
tcp 1 69 domain.tld:ftp xxx.xx.xxx.xx:53885 LAST_ACK -
tcp 1 0 domain.tld:ftp xxx.xx.xxx.xx:54594 CLOSE_WAIT 19871/proftpd: web1
warning, got duplicate tcp line.
tcp 0 0 domain.tld:ftp xxx.xx.xxx.xx:55104 ESTABLISHED -
where domain.tld is the right server Domain and xxx.xx.xxx.xx is my current IP on my computer at home.
I did restart proftpd with /etc/init.d/proftpd restart which gave me an [OK].
Any ideas?
Thanks!
torusturtle
29th August 2006, 21:15
I restartet the whole server but still everything works but ftp.
Same error.
torusturtle
30th August 2006, 13:40
/etc/rc.d/init.d/proftpd restart
gives
- warning: AuthPAMAuthoritative is deprecated
- warning: "ProFTPD" address/port (xx.xx.xxx.xxx:21) already in use by "ProFTPD server"
torusturtle
30th August 2006, 16:11
tail -f /var/log/messages
Aug 30 15:09:11 vs196135 PAM_pwdb[11745]: (ftp) session opened for user web10_webmaster by (uid=0)
Aug 30 15:09:11 vs196135 proftpd[11745]: vs196135.vserver.de (84.72.100.189[84.72.100.189]) - error: /var/log is a world writeable directory
falko
30th August 2006, 17:11
What's in /etc/proftpd.conf and /etc/proftpd_ispconfig.conf?
Which distribution do you use?
torusturtle
30th August 2006, 18:34
What's in /etc/proftpd.conf and /etc/proftpd_ispconfig.conf?
Which distribution do you use?
Thanks for asking! :-)
I use Fedora Core 3 and ISPConfig 2.2.5
/etc/proftpd.conf
# This is the ProFTPD configuration file
# $Id: proftpd.conf,v 1.1 2004/02/26 17:54:30 thias Exp $
ServerName "ProFTPD server"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
ServerType standalone
#ServerType inetd
DefaultServer on
AccessGrantMsg "User %u logged in."
#DisplayConnect /etc/ftpissue
#DisplayLogin /etc/ftpmotd
#DisplayGoAway /etc/ftpgoaway
DeferWelcome off
# Use this to excude users from the chroot
DefaultRoot ~ !adm
# Use pam to authenticate by default
AuthPAMAuthoritative on
# Do not perform ident nor DNS lookups (hangs when the port is filtered)
IdentLookups off
UseReverseDNS off
# 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
# Default to show dot files in directory listings
ListOptions "-a"
# See Configuration.html for these (here are the default values)
#MultilineRFC2228 off
#RootLogin off
#LoginPasswordPrompt on
#MaxLoginAttempts 3
#MaxClientsPerHost none
#AllowForeignAddress off # For FXP
# Allow to resume not only the downloads but the uploads too
AllowRetrieveRestart on
AllowStoreRestart 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 20
# Set the user and group that the server normally runs at.
User nobody
Group nobody
# This is where we want to put the pid file
ScoreboardFile /var/run/proftpd.score
# Normally, we want users to do a few things.
<Global>
AllowOverwrite yes
<Limit ALL SITE_CHMOD>
AllowAll
</Limit>
</Global>
# Define the log formats
LogFormat default "%h %l %u %t \"%r\" %s %b"
LogFormat auth "%v [%P] %h %t \"%r\" %s"
# TLS
# Explained at http://www.castaglia.org/proftpd/modules/mod_tls.html
#TLSEngine on
#TLSRequired on
#TLSRSACertificateFile /usr/share/ssl/certs/proftpd.pem
#TLSRSACertificateKeyFile /usr/share/ssl/certs/proftpd.pem
#TLSCipherSuite ALL:!ADH:!DES
#TLSOptions NoCertRequest
#TLSVerifyClient off
##TLSRenegotiate ctrl 3600 data 512000 required off timeout 300
#TLSLog /var/log/proftpd/tls.log
# A basic anonymous configuration, with an upload directory.
#<Anonymous ~ftp>
# User ftp
# Group ftp
# AccessGrantMsg "Anonymous login ok, restrictions apply."
#
# # We want clients to be able to login with "anonymous" as well as "ftp"
# UserAlias anonymous ftp
#
# # Limit the maximum number of anonymous logins
# MaxClients 10 "Sorry, max %m users -- try again later"
#
# # Put the user into /pub right after login
# #DefaultChdir /pub
#
# # We want 'welcome.msg' displayed at login, '.message' displayed in
# # each newly chdired directory and tell users to read README* files.
# DisplayLogin /welcome.msg
# DisplayFirstChdir .message
# DisplayReadme README*
#
# # Some more cosmetic and not vital stuff
# DirFakeUser on ftpadm
# DirFakeGroup on ftpadm
#
# # Limit WRITE everywhere in the anonymous chroot
# <Limit WRITE SITE_CHMOD>
# DenyAll
# </Limit>
#
# # An upload directory that allows storing files but not retrieving
# # or creating directories.
# <Directory uploads/*>
# AllowOverwrite no
# <Limit READ>
# DenyAll
# </Limit>
#
# <Limit STOR>
# AllowAll
# </Limit>
# </Directory>
#
# # Don't write anonymous accesses to the system wtmp file (good idea!)
# WtmpLog off
#
# # Logging for the anonymous transfers
# ExtendedLog /var/log/proftpd/access.log WRITE,READ default
# ExtendedLog /var/log/proftpd/auth.log AUTH auth
#
#</Anonymous>
DefaultRoot ~
Include /etc/proftpd_ispconfig.conf
/etc/proftpd_ispconfig.conf
###################################
#
# ISPConfig proftpd Configuration File
# Version 1.0
#
###################################
<VirtualHost 128.185.211.134>
DefaultRoot ~
AllowOverwrite on
Umask 002
Rocky
30th August 2006, 21:38
I think your problem is that you have 2 Defaultroot statements in your proftpd.conf:
DefaultRoot ~ !adm
DefaultRoot ~
Try commenting out the first line, restart Proftp and see what happens.
torusturtle
31st August 2006, 00:08
I think your problem is that you have 2 Defaultroot statements in your proftpd.conf:
DefaultRoot ~ !adm
DefaultRoot ~
Try commenting out the first line, restart Proftp and see what happens.
I did comment it out:
#DefaultRoot ~ !adm
same problem after restart. :-(
Rocky
31st August 2006, 00:21
I did comment it out:
#DefaultRoot ~ !adm
same problem after restart. :-(
Make a backup of /etc/proftpd.conf.
After that, format /etc/proftpd.conf to look like the below example. If there are extra config in your current file, just comment them out. Just make sure it looks exactly like the below example. Then run /etc/init.d/proftpd restart to restart proftp server.
# 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
# Allow FTP resuming.
# Remember to set to off if you have an incoming ftp for upload.
AllowStoreRestart 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 nobody
Group nogroup
# To cause every FTP user to be "jailed" (chrooted) into their home
# directory, uncomment this line.
DefaultRoot ~
IdentLookups off
ServerIdent on "FTP Server ready."
# Normally, we want files to be overwriteable.
AllowOverwrite on
# Bar use of SITE CHMOD by default
#<Limit SITE_CHMOD>
# DenyAll
#</Limit>
# Needed for NIS.
PersistentPasswd off
# Default root can be used to put users in a chroot environment.
# As an example if you have a user foo and you want to put foo in /home/foo
# chroot environment you would do this:
#
# DefaultRoot /home/foo foo
Include /etc/proftpd_ispconfig.conf
torusturtle
31st August 2006, 09:50
restarting failed because there is no group "nogroup"
Shutting down proftpd: [ OK ]
Starting proftpd: - no such group 'nogroup'
- Fatal: Group: Unknown group 'nogroup'. on line 31 of '/etc/proftpd.conf'
[FAILED]
Do I have to create one? Where and how?
falko
1st September 2006, 00:16
I think the group is called nobody on your system. Replace nogroup with nobody and try again.
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.