# This is a basic ProFTPD configuration file. # It establishes a single server and a single anonymous login. # It assumes that you have a user/group "nobody" and "ftp" # for normal/anonymous operation. ServerName "Servidor de FTP-Toka Importados" ServerType standalone erverIdent on "Servers identifying string" DeferWelcome on #ServerType inetd DefaultServer on UseReverseDNS off IdentLookups off # Port 21 is the standard FTP port. Port 21 # Umask 022 is a good standard umask to prevent new dirs and files # from being group and world writable. 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 15 # Set the user and group that the server normally runs at. User nobody Group nogroup # This next option is required for NIS or NIS+ to work properly: #PersistentPasswd off ScoreboardFile /var/log/scoreboard # Some logging formats 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" # Define log-files to use TransferLog /var/log/proftpd.xferlog ExtendedLog /var/log/proftpd.access_log WRITE,READ write ExtendedLog /var/log/proftpd.auth_log AUTH auth ExtendedLog /var/log/proftpd.paranoid_log ALL default SQLLogFile /var/log/proftpd.mysql # Set up authentication via SQL # =========== AuthOrder mod_sql.c SQLAuthTypes Backend SQLConnectInfo proftpd_admin@localhost root mariavilma SQLUserInfo usertable userid passwd uid gid homedir shell SQLGroupInfo grouptable groupname gid members SQLUserWhereClause "disabled=0 and (NOW()<=expiration or expiration=-1 or expiration=0)" # Log the user logging in SQLLog PASS counter SQLNamedQuery counter UPDATE "lastlogin=now(), count=count+1 WHERE userid='%u'" usertable # logout log SQLLog EXIT time_logout SQLNamedQuery time_logout UPDATE "lastlogout=now() WHERE userid='%u'" usertable # display last login time when PASS command is given SQLNamedQuery login_time SELECT "lastlogin from usertable where userid='%u'" SQLShowInfo PASS "230" "Last login was: %{login_time}" # xfer Log in mysql SQLLog RETR,STOR transfer1 SQLNamedQuery transfer1 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), 'c', NULL" xfer_stat SQLLOG ERR_RETR,ERR_STOR transfer2 SQLNamedQuery transfer2 INSERT "'%u', '%f', '%b', '%h', '%a', '%m', '%T', now(), 'i', NULL" xfer_stat AllowStoreRestart on AllowRetrieveRestart on RequireValidShell off PathDenyFilter "\.ftp)|\.ht)[a-z]+$" DefaultRoot ~ DenyFilter *.*/ AllowOverwrite off HideNoAccess off AllowAll DenyGroup !admins AllowOverwrite on HideNoAccess on AllowAll AllowOverwrite on HideNoAccess on AllowAll AllowOverwrite on HideNoAccess on AllowAll AllowOverwrite on HideNoAccess on AllowAll Order Allow,Deny Allow from 192.168., 200., 201.,10.0., Deny from all