Failed to start service : Starting proftpd: [FAILED]

10 posts / 0 new
Last post
#1 Mon, 12/16/2013 - 04:45
lwc5757

Failed to start service : Starting proftpd: [FAILED]

My proftpd is stopped after I restart my server. When I click Start Proftpd on virtualmin, it showed me Failed to start service : Starting proftpd: [FAILED]. Then I login to my server through ssh and I used these command but it give me error of

[root@SC-D6119 ~]# service proftpd start
Starting proftpd:                                          [FAILED]
[root@SC-D6119 ~]# service proftpd stop
Shutting down proftpd:                                     [FAILED]
[root@SC-D6119 ~]# service proftpd restart
Shutting down proftpd:                                     [FAILED]
Starting proftpd:                                          [FAILED]
I tested it several time and one time when i type service proftpd start, it showed me that /etc/int.d.proftpd not found.

Then I use the command yum install proftpd but it said that i have installed it and nothing to do.

Mon, 12/16/2013 - 07:37
andreychek

Howdy,

Are you by chance using CentOS?

If so, what does this command show:

rpm -qa | grep proftp

Mon, 12/16/2013 - 08:11
lwc5757

Hello, Yes, CentOS 6 Here is the result

[root@SC-D6119 ~]# rpm -qa | grep proftp proftpd-1.3.3g-2.el6.x86_64

Mon, 12/16/2013 - 08:19
lwc5757

what else of test can I take?

Mon, 12/16/2013 - 09:12
andreychek

Okay, that's good, you have the standard CentOS ProFTPd package.

When trying to start ProFTPd, do you see any messages or errors in /var/log/messages, or in your other log files?

-Eric

Mon, 12/16/2013 - 09:54
lwc5757


[root@SC-D6119 ~]# vi /var/log/messages
Dec 15 12:45:41 SC-D6119 kernel: imklog 4.6.2, log source = /proc/kmsg started.
Dec 15 12:45:41 SC-D6119 rsyslogd: [origin software="rsyslogd" swVersion="4.6.2" x-pid="1213" x-info="http://www.rsyslog.com"] (re)start
Dec 15 12:45:41 SC-D6119 kernel: Initializing cgroup subsys cpuset
Dec 15 12:45:41 SC-D6119 kernel: Initializing cgroup subsys cpu
Dec 15 12:45:41 SC-D6119 kernel: Linux version 2.6.32-220.el6.x86_64 (mockbuild@c6b18n3.bsys.dev.centos.org) (gcc version 4.4.6 20110731 (Red Hat 4.4.6-3) (GCC) ) #1 SMP Tue Dec 6 19:48:22 GMT 2011
Dec 15 12:45:41 SC-D6119 kernel: Command line: ro root=/dev/mapper/vg-root rd_NO_LUKS LANG=en_US.UTF-8 rd_NO_MD KEYTABLE=us quiet rd_LVM_LV=vg/swap SYSFONT=latarcyrheb-sun16 rhgb crashkernel=auto rd_LVM_LV=vg/root rd_NO_DM
Dec 15 12:45:41 SC-D6119 kernel: KERNEL supported cpus:
Dec 15 12:45:41 SC-D6119 kernel: Intel GenuineIntel
Dec 15 12:45:41 SC-D6119 kernel: AMD AuthenticAMD
Dec 15 12:45:41 SC-D6119 kernel: Centaur CentaurHauls
Dec 15 12:45:41 SC-D6119 kernel: BIOS-provided physical RAM map:
Dec 15 12:45:41 SC-D6119 kernel: BIOS-e820: 0000000000000000 - 000000000009fc00 (usable)
Dec 15 12:45:41 SC-D6119 kernel: BIOS-e820: 000000000009fc00 - 00000000000a0000 (reserved)
Dec 15 12:45:41 SC-D6119 kernel: BIOS-e820: 00000000000e8000 - 0000000000100000 (reserved)
@
"/var/log/messages" 97940L, 11451236C

There have no file on /var/log/proftpd

Mon, 12/16/2013 - 11:13
andreychek

Okay, what output do you receive if you run this command:

/usr/sbin/proftpd

Mon, 12/16/2013 - 23:13
lwc5757
[root@SC-D6119 ~]# /usr/sbin/proftpd
- warning: handling possibly truncated configuration data at line 250 of '/etc/proftpd.conf'
- Fatal: <IfDefine>: unclosed <IfDefine> context on line 250 of '/etc/proftpd.conf'

and here is my proftpd.conf

# This is the ProFTPD configuration file
#
# See: http://www.proftpd.org/docs/directives/linked/by-name.html

# Server Config - config used for anything outside a <VirtualHost> or <Global> context
# See: http://www.proftpd.org/docs/howto/Vhost.html

ServerName "svr1.justforsteam.com"
ServerIdent on "FTP Server ready."
ServerAdmin root@localhost
DefaultServer on

# Cause every FTP user except adm to be chrooted into their home directory
# Aliasing /etc/security/pam_env.conf into the chroot allows pam_env to
# work at session-end time (http://bugzilla.redhat.com/477120)
VRootEngine on
DefaultRoot ~ !adm
VRootAlias /etc/security/pam_env.conf etc/security/pam_env.conf

# Use pam to authenticate (default) and be authoritative
AuthPAMConfig proftpd
AuthOrder mod_auth_pam.c* mod_auth_unix.c
# If you use NIS/YP/LDAP you may need to disable PersistentPasswd
#PersistentPasswd off

# Don't do reverse DNS lookups (hangs on DNS problems)
UseReverseDNS off

# Set the user and group that the server runs as
User nobody
Group nobody

# To prevent DoS attacks, set the maximum number of child processes
# to 20.  If you need to allow more than 20 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

# Disable sendfile by default since it breaks displaying the download speeds in
# ftptop and ftpwho
UseSendfile off

# Define the log formats
LogFormat default "%h %l %u %t "%r" %s %b"
LogFormat auth "%v [%P] %h %t "%r" %s"

# Dynamic Shared Object (DSO) loading
# See README.DSO and howto/DSO.html for more details
#
# General database support (http://www.proftpd.org/docs/contrib/mod_sql.html)
#   LoadModule mod_sql.c
#
# Support for base-64 or hex encoded MD5 and SHA1 passwords from SQL tables
# (contrib/mod_sql_passwd.html)
#   LoadModule mod_sql_passwd.c
#
# Mysql support (requires proftpd-mysql package)
# (http://www.proftpd.org/docs/contrib/mod_sql.html)
#   LoadModule mod_sql_mysql.c
#
# Postgresql support (requires proftpd-postgresql package)
# (http://www.proftpd.org/docs/contrib/mod_sql.html)
#   LoadModule mod_sql_postgres.c
#
# Quota support (http://www.proftpd.org/docs/contrib/mod_quotatab.html)
#   LoadModule mod_quotatab.c
#
# File-specific "driver" for storing quota table information in files
# (http://www.proftpd.org/docs/contrib/mod_quotatab_file.html)
#   LoadModule mod_quotatab_file.c
#
# SQL database "driver" for storing quota table information in SQL tables
# (http://www.proftpd.org/docs/contrib/mod_quotatab_sql.html)
#   LoadModule mod_quotatab_sql.c
#
# LDAP support (requires proftpd-ldap package)
# (http://www.proftpd.org/docs/directives/linked/config_ref_mod_ldap.html)
#   LoadModule mod_ldap.c
#
# LDAP quota support (requires proftpd-ldap package)
# (http://www.proftpd.org/docs/contrib/mod_quotatab_ldap.html)
#   LoadModule mod_quotatab_ldap.c
#
# Support for authenticating users using the RADIUS protocol
# (http://www.proftpd.org/docs/contrib/mod_radius.html)
#   LoadModule mod_radius.c
#
# Retrieve quota limit table information from a RADIUS server
# (http://www.proftpd.org/docs/contrib/mod_quotatab_radius.html)
#   LoadModule mod_quotatab_radius.c
#
# Administrative control actions for the ftpdctl program
# (http://www.proftpd.org/docs/contrib/mod_ctrls_admin.html)
#   LoadModule mod_ctrls_admin.c
#
# Execute external programs or scripts at various points in the process
# of handling FTP commands
# (http://www.castaglia.org/proftpd/modules/mod_exec.html)
#   LoadModule mod_exec.c
#
# Support for POSIX ACLs
# (http://www.proftpd.org/docs/modules/mod_facl.html)
#   LoadModule mod_facl.c
#
# Support for using the GeoIP library to look up geographical information on
# the connecting client and using that to set access controls for the server
# (http://www.castaglia.org/proftpd/modules/mod_geoip.html)
#   LoadModule mod_geoip.c
#
# Configure server availability based on system load
# (http://www.proftpd.org/docs/contrib/mod_load.html)
#   LoadModule mod_load.c
#
# Limit downloads to a multiple of upload volume (see README.ratio)
#   LoadModule mod_ratio.c
#
# Rewrite FTP commands sent by clients on-the-fly,
# using regular expression matching and substitution
# (http://www.proftpd.org/docs/contrib/mod_rewrite.html)
#   LoadModule mod_rewrite.c
#
# Support for the SSH2, SFTP, and SCP protocols, for secure file transfer over
# an SSH2 connection (http://www.castaglia.org/proftpd/modules/mod_sftp.html)
#   LoadModule mod_sftp.c
#
# Use PAM to provide a 'keyboard-interactive' SSH2 authentication method for
# mod_sftp (http://www.castaglia.org/proftpd/modules/mod_sftp_pam.html)
#   LoadModule mod_sftp_pam.c
#
# Use SQL (via mod_sql) for looking up authorized SSH2 public keys for user
# and host based authentication
# (http://www.castaglia.org/proftpd/modules/mod_sftp_sql.html)
#   LoadModule mod_sftp_sql.c
#
# Provide data transfer rate "shaping" across the entire server
# (http://www.castaglia.org/proftpd/modules/mod_shaper.html)
#   LoadModule mod_shaper.c
#
# Support for miscellaneous SITE commands such as SITE MKDIR, SITE SYMLINK,
# and SITE UTIME (http://www.proftpd.org/docs/contrib/mod_site_misc.html)
#   LoadModule mod_site_misc.c
#
# Provide an external SSL session cache using shared memory
# (contrib/mod_tls_shmcache.html)
#   LoadModule mod_tls_shmcache.c
#
# Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny
# files, for IP-based access control
# (http://www.proftpd.org/docs/contrib/mod_wrap.html)
#   LoadModule mod_wrap.c
#
# Use the /etc/hosts.allow and /etc/hosts.deny files, or other allow/deny
# files, as well as SQL-based access rules, for IP-based access control
# (http://www.proftpd.org/docs/contrib/mod_wrap2.html)
#   LoadModule mod_wrap2.c
#
# Support module for mod_wrap2 that handles access rules stored in specially
# formatted files on disk
# (http://www.proftpd.org/docs/contrib/mod_wrap2_file.html)
#   LoadModule mod_wrap2_file.c
#
# Support module for mod_wrap2 that handles access rules stored in SQL
# database tables (http://www.proftpd.org/docs/contrib/mod_wrap2_sql.html)
#   LoadModule mod_wrap2_sql.c
#
# Provide a flexible way of specifying that certain configuration directives
# only apply to certain sessions, based on credentials such as connection
# class, user, or group membership
# (http://www.proftpd.org/docs/contrib/mod_ifsession.html)
#   LoadModule mod_ifsession.c

# TLS (http://www.castaglia.org/proftpd/modules/mod_tls.html)
<IfDefine TLS>
  TLSEngine on
  TLSRequired on
  TLSRSACertificateFile /etc/pki/tls/certs/proftpd.pem
  TLSRSACertificateKeyFile /etc/pki/tls/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
  <IfModule mod_tls_shmcache.c>
    TLSSessionCache shm:/file=/var/run/proftpd/sesscache
  </IfModule>
</IfDefine>

# Dynamic ban lists (http://www.proftpd.org/docs/contrib/mod_ban.html)
# Enable this with PROFTPD_OPTIONS=-DDYNAMIC_BAN_LISTS in /etc/sysconfig/proftpd
<IfDefine DYNAMIC_BAN_LISTS>
  LoadModule mod_ban.c
  BanEngine on
  BanLog /var/log/proftpd/ban.log
  BanTable /var/run/proftpd/ban.tab

  # If the same client reaches the MaxLoginAttempts limit 2 times
  # within 10 minutes, automatically add a ban for that client that
  # will expire after one hour.
  BanOnEvent MaxLoginAttempts 2/00:10:00 01:00:00

  # Allow the FTP admin to manually add/remove bans
  BanControlsACLs all allow user ftpadm
</IfDefine>

# Global Config - config common to Server Config and all virtual hosts
# See: http://www.proftpd.org/docs/howto/Vhost.html
<Global>

  # Umask 022 is a good standard umask to prevent new dirs and files
  # from being group and world writable
  Umask 022

  # Allow users to overwrite files and change permissions
  AllowOverwrite yes
  <Limit ALL SITE_CHMOD>
    AllowAll
  </Limit>

</Global>

# A basic anonymous configuration, with an upload directory
# Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd
<IfDefine ANONYMOUS_FTP>
  <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
    DisplayChdir .message
    DisplayReadme README*

    # Cosmetic option to make all files appear to be owned by user "ftp"
    DirFakeUser on ftp
    DirFakeGroup on ftp

    # Limit WRITE everywhere in the anonymous chroot
    <Limit WRITE SITE_CHMOD>
Tue, 12/17/2013 - 02:37
lwc5757

Oh well.. It worked when I remove the anonymous part from my proftpd.conf

# A basic anonymous configuration, with an upload directory
# Enable this with PROFTPD_OPTIONS=-DANONYMOUS_FTP in /etc/sysconfig/proftpd
<IfDefine ANONYMOUS_FTP>
  <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
    DisplayChdir .message
    DisplayReadme README*

    # Cosmetic option to make all files appear to be owned by user "ftp"
    DirFakeUser on ftp
    DirFakeGroup on ftp

   # Limit WRITE everywhere in the anonymous chroot
    <Limit WRITE SITE_CHMOD>
Tue, 12/17/2013 - 04:18
Locutus

If you don't need the anonymous FTP feature, it should be okay to just remove that block. Otherwise it should help to just add a line reading "" at the end of the block to fix the syntax error.

Topic locked