Corey martin's picture

I have installed the LAMP stack from Amazon Web Services. So far, I have it up and running (but just running). I am new to Linux, so please be patient. I have been given responsibility for creating and managing the information technology of a medium sized non profit group.

I am trying to get the ProFTP server installed and configured. I used the webmin interface to install it, and it is setup and running. The status shows as such.

I created a new user, cmartin, through users and groups and made sure to chmod and change the home directory to /var/www/.

The problem is, that I can not login to my FTP server using Filzezilla.

Status:    Resolving address of server.thevillageteam.net
Status:    Connecting to 54.164.195.167:21...
Status:    Connection established, waiting for welcome message...
Response:    220 ProFTPD 1.3.4a Server (The Village) [54.164.195.167]
Command:    USER cmartin
Response:    331 Password required for cmartin
Command:    PASS **********
Response:    530 Login incorrect.
Error:    Critical error: Could not connect to server

My ProFTPd Conf file is attached below:

#
# /etc/proftpd/proftpd.conf -- This is a basic ProFTPD configuration file.
# To really apply changes, reload proftpd after modifications, if
# it runs in daemon mode. It is not required in inetd/xinetd mode.
#

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

# Set off to disable IPv6 support which is annoying on IPv4 only boxes.
UseIPv6                off
# If set on you can experience a longer connection delay in many cases.
IdentLookups            off

ServerName "The Village"
ServerType            standalone
DeferWelcome            off

MultilineRFC2228        on
DefaultServer            on
ShowSymlinks            on

TimeoutNoTransfer        600
TimeoutStalled            600
TimeoutIdle            1200

DisplayLogin                    welcome.msg
DisplayChdir                   .message true
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       54.164.195.167

# This is useful for masquerading address with dynamic IPs:
# refresh any configured MasqueradeAddress directives every 8 hours
<IfModule mod_dynmasq.c>
# DynMasqRefresh 28800
</IfModule>

# 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 via NSS to retrieve passwords:
# PersistentPasswd        off

# This is required to use both PAM-based authentication and local passwords
#AuthOrder            mod_auth_pam.c* mod_auth_unix.c

# 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

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

# Logging onto /var/log/lastlog is enabled but set to off by default
#UseLastlog on

# In order to keep log file dates consistent after chroot, use timezone info
# from /etc/localtime.  If this is not set, and proftpd is configured to
# chroot (e.g. DefaultRoot or <Anonymous>), it will use the non-daylight
# savings timezone regardless of whether DST is in effect.
SetEnv TZ :/etc/localtime

<IfModule mod_quotatab.c>
QuotaEngine off
</IfModule>

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


# Delay engine reduces impact of the so-called Timing Attack described in
# http://www.securityfocus.com/bid/11430/discuss
# It is on by default.
<IfModule mod_delay.c>
DelayEngine on
</IfModule>

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

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

#
# Alternative authentication frameworks
#
#Include /etc/proftpd/ldap.conf
#Include /etc/proftpd/sql.conf

#
# This is used for FTPS connections
#
#Include /etc/proftpd/tls.conf

#
# Useful to keep VirtualHost/VirtualRoot directives separated
#
#Include /etc/proftpd/virtuals.conf

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

# Include other custom configuration files
Include /etc/proftpd/conf.d/
ServerAdmin corey.martin@thevillageteam.net

Can someone please look at this and help me figure out what I am doing wrong?

 

Thanks,

 

Corey

Forum: 
Jeremy Davis's picture

Or do you just need to connect to your server with Filezilla? If the latter, then it works OOTB (ProFTPd or other software not required). You just need to connect using SFTP (FTP over SSH). In Filezilla, either specify the SFTP protocol, or specify port 22 (default SFTP port).

Corey martin's picture

I would like to use ProFTPd but in the mean time the SFTP will work for me.

Can you look at the FTP config and help me with it though? I was thinking I was doing well but turns out Linux is harder than Windows. I see why its so secured and preferred though lol I can't even get in my own server.

 

Thanks

 

Corey

Jeremy Davis's picture

But there is a Webmin module for it AFAIK which might make it easier?

apt-get install webmin-proftpd

However, I have used vsftpd and found it really straight forward to setup and use... IIRC the Ubuntu Server docs explained it really well...

Corey martin's picture

I just decided to Install Webuzo because I am lazy. Now everything works as intended.

 

Thanks

Jeremy Davis's picture

Sorry to hear that TurnKey didn't fulfill your desires/needs better. Out of interest, what is the rationale for creating extra users and setting /var/www as their home? Is it because you want others to login and use the server?

Also, I answered your post above, even though it's probably irrelevant to you now. I figured that perhaps it might be of some use to someone else (who finds this thread via search)...

Julien GARINO's picture

Hi,

I would like to install a virtual appliance as a "FTP server with FTP account management" (I insist port 21, not SFTP port 22).

Here is my needs :

- Serveral customers need to upload their files onto my FTP Server
- Easch customer has its own "private space", because each customer is placed under a precise subdirectory
- The FTP admin account can see all the subdirectories
- A web interface is here to configure : the ftp accounts, the directories where the customer will write its files, the quotas eventually

- The ProFTPd FTP Server could store these infos into a mysql database.
- This way the logs and the accounts will be available from the web interface.

Can you produce such a dedicated virtual machine ?

Thanks.

Knowledge is sharing, and vice versa !

Jeremy Davis's picture

FWIW it probably would have been better to start your own thread rather than posting on an old one...

Anyway, such an appliance doesn't exist already in the TurnKey library and it's not likely that anything like that will be created by the core team anytime soon (we already have a ton of stuff on our todo list...). But if you're not scared to get your hands dirty then you probably should be able to set something like what you are after relatively easily (with a bit of patience, a bit of playing and a bit of googling).

If you only intend to use it as an FTP server (and don't need any of the other features included in the Fileserver) then it may be best to just start with Core. Then the first step would be to install an FTP server such as ProFTPd (or vsftpd). vsftpd is really easy to set up, but ProFTPd is also pretty popular and has a Webmin module (as I posted above ages ago). By default all users will get their own private directory in /home/<username> and Webmin should give you your UI to create new users. AFAIK once you have it set up any new Linux user will also have access via FTP. The other thing that you may want is to chroot-jail your users (so that they can't browse through the full operating system. You'll need to google that but should be pretty straight forward...

I strongly urge you to document what you do so that if you get lost you can retrace your steps and/or start again from scratch. Also when you're done you'll be able to share with others! :)

Jeremy Davis's picture

But you seem like a human and I appreciate your comment regarding whether or not it is appropriate to post here and your candidacy and clear disclaimer on the lack of association.

So on this occasion I'm going to leave your post. Please don't abuse that and start spamming our forums with offers such as this though!

Also if you have an opportunity to contribute back to TurnKey that is always welcome! E.g. any suggestions/fixes/improvements/general-feedback/etc.

Anyway, good luck with your business.

Also FWIW on this occasion Julien has already worked out what he needs and has provided documentation here.

Julien GARINO's picture

Hi,

thanks for the reply.

I have already began to work on it and would like to share it in a new post, this way, it will be available for others and maybe a new appliance will come...

Cheers !

Knowledge is sharing, and vice versa !

Jeremy Davis's picture

That sounds great! I'll be looking forward to reading your post! :)

Add new comment