Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 254174 - net-ftp/proftpd-1.3.1_rc2-r3 : configuration error
Summary: net-ftp/proftpd-1.3.1_rc2-r3 : configuration error
Status: RESOLVED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Luca Longinotti (RETIRED)
URL:
Whiteboard:
Keywords:
: 254178 254182 (view as bug list)
Depends on:
Blocks:
 
Reported: 2009-01-08 00:06 UTC by Joe Vitti
Modified: 2009-02-23 12:57 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Joe Vitti 2009-01-08 00:06:34 UTC
I use a custom configuration for proftpd, and the service is unable to start, saying:

server1 /etc/proftpd# service proftpd start
 * Checking proftpd configuration ...
 * Configuration error: please fix your configuration file (/etc/proftpd/proftpd.conf).

I've checked log files, there is nothing of relevance in any. Attached is my proftpd.conf file.

Reproducible: Always




ServerName                      "vitti1"

ServerType                      inetd
DefaultServer                   on

# Port 21 is the standard FTP port.
Port                            21

# Minimum mod_sql config to avoid excess log messages
#SQLAuthTypes                   Plaintext

ClamLocalSocket                 /var/amavis/clamd.sock
ClamWarn                        on

TimeoutLogin                    120
TimeoutIdle                     600
TimeoutNoTransfer               900
TimeoutStalled                  3600

ServerIdent                     off
IdentLookups                    off
UseReverseDNS                   on
AllowForeignAddress             on
AllowRetrieveRestart            on
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
#MaxClientsPerHost              4

# Set the user and group that the server normally runs at.
User                            proftpd
Group                           proftpd

AuthPAM                         on
AuthPAMConfig                   ftp
RequireValidShell               no
DefaultRoot                     ~

#ScoreboardFile                 /var/run/proftpd/proftpd.scoreboard

LogFormat                       default         "%h %l %u %t \"%r\" %s %b"
LogFormat                       auth            "%v [%P] %h %t \"%r\" %s"
LogFormat                       write           "%h %l %u %t \"%r\" %s %b"
ExtendedLog                     /var/log/proftpd/access.log WRITE,READ write
ExtendedLog                     /var/log/proftpd/auth.log AUTH auth
TransferLog                     /var/log/proftpd/xferlog

DisplayLogin                    welcome.msg
DisplayChdir                    .message


<Limit LOGIN>
        AllowGroup webusers
        DenyAll

#       TimeoutNoTransfer 0
#       TimeoutIdle 0
</Limit>

# Normally, we want homedir files to be overwriteable.
<Directory ~>
        AllowOverwrite          on
        AllowStoreRestart       on
        <Limit ALL>
                AllowAll
                IgnoreHidden    off
        </Limit>
</Directory>


# A basic anonymous configuration, no upload directories.
<Anonymous ~ftp>
        User                            ftp
        Group                           ftp
        # 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                      20

        # We want 'welcome.msg' displayed at login, and '.message' displayed
        # in each newly chdired directory.
        DisplayLogin                    welcome.msg
        DisplayChdir                    .message

        # It is a very good idea to allow only filenames containing normal
        # alphanumeric characters for uploads (and not shell code...)
        PathAllowFilter "^[a-zA-Z0-9 _./\-]+$"

        # We don't want .ftpaccess or .htaccess files to be uploaded
        PathDenyFilter "(\.ftp)|(\.ht)[a-z]+$"
        PathDenyFilter "^\."
        PathDenyFilter "^ "
        PathDenyFilter " $"

        <Limit LOGIN>
#               DenyAll
                AllowAll
        </Limit>

        # Limit WRITE everywhere in the anonymous chroot
        <Limit WRITE>
                DenyAll
        </Limit>

#       <Limit READ DIRS>
#               IgnoreHidden            on
#       </Limit>
        <Directory ~ftp/incoming>
                AllowOverwrite          off
                <Limit READ>
                        DenyAll
                        IgnoreHidden    on
                </Limit>
                <Limit STOR MKD>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
                <Limit WRITE DIRS READ>
                        DenyAll
                        IgnoreHidden    on
                </Limit>
                <Limit CWD XCWD CDUP>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
        </Directory>
        <Directory ~ftp/incoming/*>
                AllowOverwrite          off
                <Limit READ LIST>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
                <Limit STOR MKD>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
                <Limit WRITE DIRS>
                        DenyAll
                        IgnoreHidden    on
                </Limit>
                <Limit CWD XCWD CDUP>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
        </Directory>
        <Directory ~ftp>
                <Limit READ LIST>
                        AllowAll
                        IgnoreHidden    on
                </Limit>
        </Directory>

</Anonymous>
Comment 1 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-08 01:36:39 UTC
*** Bug 254178 has been marked as a duplicate of this bug. ***
Comment 2 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2009-01-08 01:50:40 UTC
*** Bug 254182 has been marked as a duplicate of this bug. ***
Comment 3 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-08 16:00:37 UTC
Please run `/usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf' and post the output here.

I am curious why the init.d script redirects the output to /dev/null, so assigning straight away.
Comment 4 Joe Vitti 2009-01-08 23:00:15 UTC
(In reply to comment #0)
> I use a custom configuration for proftpd, and the service is unable to start,
> saying:
> 
> server1 /etc/proftpd# service proftpd start
>  * Checking proftpd configuration ...
>  * Configuration error: please fix your configuration file
> (/etc/proftpd/proftpd.conf).
> 
> I've checked log files, there is nothing of relevance in any. Attached is my
> proftpd.conf file.
> 
> Reproducible: Always
> 
> 
> 
> 
> ServerName                      "vitti1"
> 
> ServerType                      inetd
> DefaultServer                   on
> 
> # Port 21 is the standard FTP port.
> Port                            21
> 
> # Minimum mod_sql config to avoid excess log messages
> #SQLAuthTypes                   Plaintext
> 
> ClamLocalSocket                 /var/amavis/clamd.sock
> ClamWarn                        on
> 
> TimeoutLogin                    120
> TimeoutIdle                     600
> TimeoutNoTransfer               900
> TimeoutStalled                  3600
> 
> ServerIdent                     off
> IdentLookups                    off
> UseReverseDNS                   on
> AllowForeignAddress             on
> AllowRetrieveRestart            on
> 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
> #MaxClientsPerHost              4
> 
> # Set the user and group that the server normally runs at.
> User                            proftpd
> Group                           proftpd
> 
> AuthPAM                         on
> AuthPAMConfig                   ftp
> RequireValidShell               no
> DefaultRoot                     ~
> 
> #ScoreboardFile                 /var/run/proftpd/proftpd.scoreboard
> 
> LogFormat                       default         "%h %l %u %t \"%r\" %s %b"
> LogFormat                       auth            "%v [%P] %h %t \"%r\" %s"
> LogFormat                       write           "%h %l %u %t \"%r\" %s %b"
> ExtendedLog                     /var/log/proftpd/access.log WRITE,READ write
> ExtendedLog                     /var/log/proftpd/auth.log AUTH auth
> TransferLog                     /var/log/proftpd/xferlog
> 
> DisplayLogin                    welcome.msg
> DisplayChdir                    .message
> 
> 
> <Limit LOGIN>
>         AllowGroup webusers
>         DenyAll
> 
> #       TimeoutNoTransfer 0
> #       TimeoutIdle 0
> </Limit>
> 
> # Normally, we want homedir files to be overwriteable.
> <Directory ~>
>         AllowOverwrite          on
>         AllowStoreRestart       on
>         <Limit ALL>
>                 AllowAll
>                 IgnoreHidden    off
>         </Limit>
> </Directory>
> 
> 
> # A basic anonymous configuration, no upload directories.
> <Anonymous ~ftp>
>         User                            ftp
>         Group                           ftp
>         # 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                      20
> 
>         # We want 'welcome.msg' displayed at login, and '.message' displayed
>         # in each newly chdired directory.
>         DisplayLogin                    welcome.msg
>         DisplayChdir                    .message
> 
>         # It is a very good idea to allow only filenames containing normal
>         # alphanumeric characters for uploads (and not shell code...)
>         PathAllowFilter "^[a-zA-Z0-9 _./\-]+$"
> 
>         # We don't want .ftpaccess or .htaccess files to be uploaded
>         PathDenyFilter "(\.ftp)|(\.ht)[a-z]+$"
>         PathDenyFilter "^\."
>         PathDenyFilter "^ "
>         PathDenyFilter " $"
> 
>         <Limit LOGIN>
> #               DenyAll
>                 AllowAll
>         </Limit>
> 
>         # Limit WRITE everywhere in the anonymous chroot
>         <Limit WRITE>
>                 DenyAll
>         </Limit>
> 
> #       <Limit READ DIRS>
> #               IgnoreHidden            on
> #       </Limit>
>         <Directory ~ftp/incoming>
>                 AllowOverwrite          off
>                 <Limit READ>
>                         DenyAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit STOR MKD>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit WRITE DIRS READ>
>                         DenyAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit CWD XCWD CDUP>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>         </Directory>
>         <Directory ~ftp/incoming/*>
>                 AllowOverwrite          off
>                 <Limit READ LIST>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit STOR MKD>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit WRITE DIRS>
>                         DenyAll
>                         IgnoreHidden    on
>                 </Limit>
>                 <Limit CWD XCWD CDUP>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>         </Directory>
>         <Directory ~ftp>
>                 <Limit READ LIST>
>                         AllowAll
>                         IgnoreHidden    on
>                 </Limit>
>         </Directory>
> 
> </Anonymous>
> 

vitti1 ~# /usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf
Checking syntax of configuration file
 - Fatal: unknown configuration directive 'ClamWarn' on line 13 of '/etc/proftpd/proftpd.conf'
Comment 5 Jeroen Roovers (RETIRED) gentoo-dev 2009-01-08 23:11:00 UTC
(In reply to comment #4)
> (In reply to comment #0)
> HUGE SNIP <

Er, why did you quote all that?

> vitti1 ~# /usr/sbin/proftpd -t -c /etc/proftpd/proftpd.conf
> Checking syntax of configuration file
>  - Fatal: unknown configuration directive 'ClamWarn' on line 13 of
> '/etc/proftpd/proftpd.conf'

Please post your `emerge --info' too.
Comment 6 Joe Vitti 2009-01-08 23:32:46 UTC
(In reply to comment #5)
Portage 2.1.4.5 (!/usr/local/portage/profiles/vc/x86, gcc-3.4.6, glibc-2.6.1-r0, 2.6.23.12vc i686)
=================================================================
System uname: 2.6.23.12vc i686 Intel(R) Celeron(R) CPU 2.66GHz
Timestamp of tree: Sat, 20 Dec 2008 09:00:01 +0000
app-shells/bash:     3.2_p33
dev-java/java-config: 1.3.7-r1, 2.1.6-r1
dev-lang/python:     2.4.3-r4, 2.5.2-r7
dev-python/pycrypto: 2.0.1-r6
sys-apps/baselayout: 1.12.11.1
sys-apps/sandbox:    1.2.18.1-r2
sys-devel/autoconf:  2.13, 2.61-r2
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.1-r1
sys-devel/binutils:  2.18-r3
sys-devel/gcc-config: 1.4.0-r4
sys-devel/libtool:   1.5.26
virtual/os-headers:  2.6.23-r3
ACCEPT_KEYWORDS="x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -mtune=prescott -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fprefetch-loop-arrays -ffast-math -funit-at-a-time -fpeel-loops -funswitch-loops"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/php/apache2-php5/ext-active/ /etc/php/cgi-php5/ext-active/ /etc/php/cli-php5/ext-active/ /etc/revdep-rebuild /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d"
CXXFLAGS="-march=prescott -mtune=prescott -O3 -pipe -fforce-addr -fomit-frame-pointer -funroll-loops -frerun-cse-after-loop -frerun-loop-opt -falign-functions=4 -fprefetch-loop-arrays -ffast-math -funit-at-a-time -fpeel-loops -funswitch-loops"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict unmerge-orphans userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LINGUAS="en es en_GB"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="3dnow X aalib acl acpi activefilter adns aim alsa apache2 apm atm audiofile bash-completion berkdb big-tables bzlib caps cddb cdr clamav crypt curl dhcp divx4linux dlloader dvb dvd dvdr elf erandom esd ethereal examples extensions extraengine f77 faad fam fastcgi flac flash fortran freetds gd gdbm geoip ggi gif ginac gmp gpm gs gtk gtk2 hardened icq idea imagemagick imap imlib informix innodb iproute2 ipv6 jabber java jce jpeg junit lcms ldap libg++ libwww lirc lm_sensors logrotate lua lzw mad maildir mcal memlimit mikmod mmx mng motif mp3 mpeg mpi mppe-mppc msn mssql mysql ncurses nntp nptl nsplugin objc odbc oggvorbis oscar pam parse-clocks pcap pcre pdflib perl pg-hier pg-intdatetime pic pie plotutils png pnp postgres python qt quotas rc5 readline ruby samba sasl sensord slang snmp socks5 softquota sox speex spell sqlite sse ssl svg szip tcltk tetex theora threads tiff truetype unicode wmf x86 xfs xinetd xml xml2 xorg xvid yahoo zlib" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="access auth auth_basic authn_alias authn_anon authn_dbd authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user auth_digest alias file_cache echo charset_lite cache disk_cache mem_cache ext_filter filter case_filter case_filter_in deflate mime_magic cern_meta expires headers usertrack unique_id proxy proxy_connect proxy_ftp proxy_http info include cgi cgid dav dav_fs vhost_alias speling rewrite log_config logio env setenvif mime status autoindex asis negotiation dir imap actions userdir version" APACHE2_MPMS="worker" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en es en_GB" USERLAND="GNU" VIDEO_CARDS="vga vesa fbdev apm"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 7 Bernard Cafarelli gentoo-dev 2009-02-17 22:07:55 UTC
Init script does not redirect output to /dev/null anymore, should make it easier to see the errors
Comment 8 Bernard Cafarelli gentoo-dev 2009-02-23 12:57:15 UTC
As for clamav problem itself, please try with new clamav module available in proftpd-1.3.2 (warning: some configuration options have changed), and reopen if problem still occurs. Thanks!