(Dec 29) New version 0.9.8-18 has been released

Proftpd Cant Start Via New Code

Questions regarding the FTP Server
vsFTPd, ProFTPd
Forum rules
Before creating a new topic or reply on the forum you should fill out additional fields "Os" and "Web" in your profile section.
In case of violation, the topic can be closed or response from the support will not be received.
msk19994
Posts: 23
Joined: Thu Jun 05, 2014 5:55 am

Proftpd Cant Start Via New Code

Postby msk19994 » Sun Nov 27, 2016 3:06 am

Hey Guys
So i got a new server and installed proftpd (with vestacp using onsite install code) and then i installed its MySQL module
now the issue is that whenever i try to replace the proftpd.conf code with the one i have it stops and doesnt restart
but the same code works on my other server using the same vestacp config

The code that i want to add to replace the previous code is

Code: Select all

# 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         "ProFTPD server"
ServerIdent         on "FTP Server ready."
ServerAdmin         root@localhost
DefaultServer         on

DefaultRoot         ~

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

LoadModule mod_sql.c
LoadModule mod_sql_mysql.c

# The passwords in MySQL are encrypted using CRYPT
SQLAuthTypes            OpenSSL Crypt
SQLAuthenticate         users groups

SQLConnectInfo  admin_hgr@hostingrill.co admin_hgr somepassword

# Here we tell ProFTPd the names of the database columns in the "usertable"
# we want it to interact with. Match the names with those in the db
SQLUserInfo     plugin_ftp_proftpd_user user_id passwd uid gid home_dir shell

# Here we tell ProFTPd the names of the database columns in the "grouptable"
# we want it to interact with. Again the names match with those in the db
SQLGroupInfo    plugin_ftp_proftpd_group group_name gid members

# set min UID and GID - otherwise these are 999 each
SQLMinID        500

# Update count every time user logs in
SQLLog PASS updatecount
SQLNamedQuery updatecount UPDATE "count=count+1, accessed=now() WHERE user_id='%u'" plugin_ftp_proftpd_user

# Update modified everytime user uploads or deletes a file
SQLLog  STOR,DELE modified
SQLNamedQuery modified UPDATE "modified=now() WHERE user_id='%u'" plugin_ftp_proftpd_user

SqlLogFile /var/log/proftpd/sql.log

RootLogin off
RequireValidShell off

# auto create home
CreateHome on 711
                                       


the current code is

Code: Select all

ServerName                      "FTP"
ServerIdent                     on "FTP Server ready."
ServerAdmin                     root@localhost
DefaultServer                   on
DefaultRoot                  ~ !adm

<IfModule mod_vroot.c>
    VRootEngine                 on
    VRootAlias                  /etc/security/pam_env.conf etc/security/pam_env.conf
</IfModule>

AuthPAMConfig                   proftpd
AuthOrder                       mod_auth_pam.c* mod_auth_unix.c
UseReverseDNS                   off
User                            nobody
Group                           nobody
MaxInstances                    20
UseSendfile                     off
LogFormat                       default "%h %l %u %t \"%r\" %s %b"
LogFormat                       auth    "%v [%P] %h %t \"%r\" %s"
ListOptions                     -a
RequireValidShell               off
PassivePorts                    12000 12100

<Global>
  Umask                         002
  IdentLookups                  off
  AllowOverwrite                yes
  <Limit ALL SITE_CHMOD>
    AllowAll
  </Limit>
</Global>


Btw when i try to check if the proftpd is working using
chkconfig proftpd on
it says

Code: Select all

Note: Forwarding request to 'systemctl enable proftpd.service'.


Thankyou

msk19994
Posts: 23
Joined: Thu Jun 05, 2014 5:55 am

Re: Proftpd Cant Start Via New Code

Postby msk19994 » Sat Dec 03, 2016 8:18 am

In my openion its due to the sql connection i add ... Ie as soon as i add those lines it crashes
Maybe the mod sql is not working correctly can anyone tell me how to reinstall it ?

n0rton
Posts: 29
Joined: Tue Mar 31, 2015 7:31 am

Re: Proftpd Cant Start Via New Code

Postby n0rton » Wed Dec 21, 2016 10:38 am

msk19994 wrote:In my openion its due to the sql connection i add ... Ie as soon as i add those lines it crashes
Maybe the mod sql is not working correctly can anyone tell me how to reinstall it ?


U solved?


Return to “FTP Server”



Who is online

Users browsing this forum: No registered users and 1 guest

cron