HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (
-   Server Operation (
-   -   proftpd blocking out user? (

bswinnerton 22nd October 2008 04:34

proftpd blocking out user?
Hi everyone,

I've been trying to narrow down my FTP problem, and finally came close today. But could use someone's help. I created a user (webuser) using adduser and added him to a group called webusers. I then carried out the following:

chgrp webusers /var/www/
so that this one user could have access to all of the folders in my /var/www/ directory. But for some reason when I try to FTP in (Only with this user), it will either time out or simply not list the directory contents. I SSH'd into my server as webuser and even tried to make sure that I could ls the /var/www/ directory and was able to create a new file and then delete it so it is not a permissions problem. So the only thing that I could think of was that perhaps proftpd was blocking that one user? Is that possible?

Here is my proftpd.conf file:


# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes reload proftpd after modifications.

# Includes DSO modules
Include /etc/proftpd/modules.conf

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6                                off

ServerName                        "Debian"
ServerType                        standalone
DeferWelcome                        off

MultilineRFC2228                on
DefaultServer                        on
ShowSymlinks                        on

TimeoutNoTransfer                600
TimeoutStalled                        600
TimeoutIdle                        1200

DisplayLogin                    welcome.msg
DisplayChdir                    .message
ListOptions                        "-l"

DenyFilter                        \*.*/

# Use this to jail all users in their homes
DefaultRoot                        ~

# Users require a valid shell listed in /etc/shells to login.
# Use this directive to release that constrain.
# RequireValidShell                off

# Port 21 is the standard FTP port.
Port                                21

# In some cases you have to specify passive ports range to by-pass
# firewall limitations. Ephemeral ports can be used for that, but
# feel free to use a more narrow range.
# PassivePorts                  49152 65534

# If your host was NATted, this option is useful in order to
# allow passive tranfers to work. You have to use your public
# address and opening the passive ports used on your firewall as well.
# MasqueradeAddress      

# 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                                proftpd
Group                                nogroup

# Umask 022 is a good standard umask to prevent new files and dirs
# (second parm) from being group and world writable.
Umask                                022  022
# Normally, we want files to be overwriteable.
AllowOverwrite                        on

# Uncomment this if you are using NIS or LDAP to retrieve passwords:
# PersistentPasswd                off

# Be warned: use of this directive impacts CPU average load!
# Uncomment this if you like to see progress and transfer rate with ftpwho
# in downloads. That is not needed for uploads rates.
# UseSendFile                        off

# Choose a SQL backend among MySQL or PostgreSQL.
# Both modules are loaded in default configuration, so you have to specify the backend
# or comment out the unused module in /etc/proftpd/modules.conf.
# Use 'mysql' or 'postgres' as possible values.
#<IfModule mod_sql.c>
# SQLBackend                        mysql

TransferLog /var/log/proftpd/xferlog
SystemLog  /var/log/proftpd/proftpd.log

<IfModule mod_tls.c>
TLSEngine off

<IfModule mod_quota.c>
QuotaEngine on

<IfModule mod_ratio.c>
Ratios on

# Delay engine reduces impact of the so-called Timing Attack described in
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on

<IfModule mod_ctrls.c>
ControlsEngine        on
ControlsMaxClients    2
ControlsLog          /var/log/proftpd/controls.log
ControlsInterval      5
ControlsSocket        /var/run/proftpd/proftpd.sock

<IfModule mod_ctrls_admin.c>
AdminControlsEngine on

# A basic anonymous configuration, no upload directories.

# <Anonymous ~ftp>
#  User                                ftp
#  Group                                nogroup
#  # We want clients to be able to login with "anonymous" as well as "ftp"
#  UserAlias                        anonymous ftp
#  # Cosmetic changes, all files belongs to ftp user
#  DirFakeUser        on ftp
#  DirFakeGroup on ftp
#  RequireValidShell                off
#  # 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
#  <Directory *>
#    <Limit WRITE>
#      DenyAll
#    </Limit>
#  </Directory>
#  # Uncomment this if you're brave.
#  # <Directory incoming>
#  #  # Umask 022 is a good standard umask to prevent new files and dirs
#  #  # (second parm) from being group and world writable.
#  #  Umask                                022  022
#  #            <Limit READ WRITE>
#  #            DenyAll
#  #            </Limit>
#  #            <Limit STOR>
#  #            AllowAll
#  #            </Limit>
#  # </Directory>
# </Anonymous>

IdentLookups off
ServerIdent on "FTP Server ready."

DefaultRoot ~

Include /etc/proftpd_ispconfig.conf

UseReverseDNS off

If anyone else has any other ideas to solve this please let me know!!

falko 22nd October 2008 14:29

Are there any errors in your logs? Did you try active and passive mode?
What's webuser's home directory?

bswinnerton 22nd October 2008 16:26

No there are no errors in the proftpd log, only ones saying that the user successfully logged in and that its chrooting to /var/www/

The home folder is /var/www/ so that one user can browse all of my web folders for ease of access. I've had this working in the past, and don't know why it stopped working now.

I have tried both active and passive, but none the less I can log in on any different user fine with active and passive.

falko 23rd October 2008 17:36

What's the output of

grep webuser /etc/passwd
, and what's in /etc/shells?

bswinnerton 23rd October 2008 23:50



and /etc/shells:


# /etc/shells: valid login shells

falko 24th October 2008 22:29

That's ok. What's the output of

ls -la /var/www

bswinnerton 25th October 2008 06:01

Data removed for privacy

bswinnerton 25th October 2008 07:55

Here is just a quick addition to help you troubleshoot:

I have an VERY weird problem. I can login with this user when I am inside the local network. But when I get out I cannot FTP in with this user (But still can with other users).

I am completely baffled.

falko 26th October 2008 15:47

Did you also try active and passive mode from outside your LAN? I guess it could be your router's firewall.

bswinnerton 26th October 2008 15:55

Yes, I have tried both active and passive outside my LAN. But how would that explain letting me login as anyone else?

All times are GMT +2. The time now is 03:20.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.