HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Server Operation (http://www.howtoforge.com/forums/forumdisplay.php?f=5)
-   -   proftpd blocking out user? (http://www.howtoforge.com/forums/showthread.php?t=28031)

bswinnerton 22nd October 2008 03: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:
Code:

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:

Code:

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

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

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

<IfModule mod_tls.c>
TLSEngine off
</IfModule>

<IfModule mod_quota.c>
QuotaEngine on
</IfModule>

<IfModule mod_ratio.c>
Ratios on
</IfModule>


# Delay engine reduces impact of the so-called Timing Attack described in
# http://security.lss.hr/index.php?page=details&ID=LSS-2004-10-02
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

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

<IfModule mod_ctrls_admin.c>
AdminControlsEngine on
</IfModule>

# 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 13: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 15: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 16:36

What's the output of
Code:

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

bswinnerton 23rd October 2008 22:50

/etc/passwd:

Code:

webuser:x:1002:1002:,,,:/var/www/:/bin/bash
and /etc/shells:

Code:

# /etc/shells: valid login shells
/bin/csh
/bin/sh
/usr/bin/es
/usr/bin/ksh
/bin/ksh
/usr/bin/rc
/usr/bin/tcsh
/bin/tcsh
/usr/bin/esh
/bin/dash
/bin/bash
/bin/rbash
/bin/false
/SENDMAIL/ANY/SHELL/


falko 24th October 2008 21:29

That's ok. What's the output of
Code:

ls -la /var/www
?

bswinnerton 25th October 2008 05:01

Data removed for privacy

bswinnerton 25th October 2008 06: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 14: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 14: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 02:03.

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