Re: [Proftpd-devel] bugs

2025-10-18 Thread info--- via Proftp-devel
and what i mis upload en download from file. Noth only "%f"

 

Van: [email protected]  
Verzonden: donderdag 25 september 2025 10:45
Aan: '[email protected]'

Onderwerp: bugs

 

There are some errors in the mod_sql

 

This is correct when running

SQLUserInfo ftpuser username passwd uid gid homedir shell

SQLUserWhereClause "Active = 1 and disabled = 0 and username<>'-' and
(failmax = 0 or failcount < failmax)  and (loginafter is null or (loginafter
< now() and faillock = 1) or faillock = 0) and (login>

 

This is not correct when running

When i use "ftpuser" in the statements the reference in the sql.log is users
also for groups! When i change it to users and groups it works. The rest of
te tables begin with ftp!

 

SQLNamedQuery userinfo FREEFORM "SELECT
username,passwd,uid,gid,homedir,shell FROM ftpusers WHERE username = '%U'"
proftpd

SQLUserInfo custom:/userinfo

 

I have a solution for 

1.  monthy up-/download see "delete_oke1, delete_oke2" Date_format can
not be used because some "%" overwrite with the defaults of proftpd sql
var's  
2.  fail amounts
3.  block a period of time for login
4.  block always after a date
5.  SQLUserInfo custom:/userinfo is for a timeclock to login only am or
pm etc.etc.

 

Do you have a solution for MaxStoreFileSize is proftpd sql.

I mis uid and gid in quota.conf, because i want the user name to replace the
uid. This metadata technic is better.

Proftpd sql var for gid

 

Hope to hear from you soon

Best Regast

Frank Bellen

Dutch

 

 

 

 




 

#

# Proftpd sample configuration for SQL-based authentication.

#

# (This is not to be used if you prefer a PAM-based SQL authentication)

#

#http://www.proftpd.org/docs/contrib/mod_quotatab_sql.html



   QuotaEngine on

   

   Include /etc/proftpd/sql_quota.conf

 

   AuthPAMConfig proftpd

 

   #AllowStoreRestart   on

   #AllowRetrieveRestarton

 

   #Update count every time a user logs in

   # server_ip='%V'

   #SQLUserWhereClause "not disabled = 1"

   #SQLGroupWhereClause "not disabled = 1"

 

   #Logging of MySql

   SqlLogFile /var/log/proftpd/sql.log

 

   #create a user's home directory on demand if it doesn't exist

   #CreateHome on

 

   SQLBackendmysql

 

   #Type of Passwords in MySQL are OpenSSL Crypt Plaintext Empty Backend

   SQLAuthTypes Plaintext

 

   #SQLAuthenticate users groups

 

   SQLEngine on

   SQLAuthenticate on

   #SQLAuthenticate user* group*

 

   #used to connect to the database 

   #databasename@host database_user user_password

   SQLConnectInfo  proftpd@localhost proftpd (*Bn185961.*)

   SQLNamedConnectInfo proftpd mysql proftpd@localhost:3306 proftpd
(*Bn185961.*)

 

   #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 ftpuser username passwd uid gid homedir shell

   SQLUserWhereClause "Active = 1 and disabled = 0 and username<>'-' and
(failmax = 0 or failcount < failmax)  and (loginafter is null or (loginafter
< now() and faillock = 1) or faillock = 0) and (loginexpired is null or
loginexpired < now())"

 

   # 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

 

   SQLGroupInfoftpgroup groupname gid members

   SQLGroupWhereClause "disabled = 0"

 

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

   SQLMinID500

 

   #display last login time when PASS command is given

   SQLNamedQuery login_time SELECT "modified from ftpuser where
username='%U' and disabled = 0 and Active = 1"

   SQLShowInfo PASS "230" "Last login was: %{login_time}"

 

   # Update count every time user logs in

   SQLLog PASS updatecount

   SQLNamedQuery updatecount UPDATE "failcount = 0,count=count+1,
accessed=now() WHERE username='%U'" ftpuser

 

   #logout log

   SQLLog EXIT time_logout

   SQLNamedQuery time_logout UPDATE "modified=now() WHERE username='%U' and
disabled = 0 and active = 1" ftpuser

 

   # Update modified everytime user uploads or deletes a file

   SQLLog  STOR,DELE modified

   SQLNamedQuery modified UPDATE "modified=now() WHERE username='%U'"
ftpuser

 

   #login attempts

   SQLLog ERR_PASS log_fails0 IGNORE_ERRORS

   SQLNamedQuery log_fails0 FREEFORM "UPDATE ftpuser set failcount =
failcount + 1 WHERE username = '%U' and disabled = 0 and active = 1 and
failmax > 0" proftpd

 

   SQLLog ERR_PASS log_fails1 IGNORE_ERRORS

 SQLNamedQuery log_fails1 FREEFORM "UPDATE ftpuser set disabled = 1
WHERE username = '%U' and failcount > failmax - 1 and active = 1 and failmax
> 0" proftpd

 

   SQLLog ERR_PASS log_fails2 IGNORE_ERRORS

 SQLNamedQuery log_fails2  UPDATE "loginafter = DATE_ADD(NOW(), INTERVAL
loginaft

[Proftpd-devel] bugs

2025-09-25 Thread info--- via Proftp-devel
There are some errors in the mod_sql

 

This is correct when running

SQLUserInfo ftpuser username passwd uid gid homedir shell

SQLUserWhereClause "Active = 1 and disabled = 0 and username<>'-' and
(failmax = 0 or failcount < failmax)  and (loginafter is null or (loginafter
< now() and faillock = 1) or faillock = 0) and (login>

 

This is not correct when running

When i use "ftpuser" in the statements the reference in the sql.log is users
also for groups! When i change it to users and groups it works. The rest of
te tables begin with ftp!

 

SQLNamedQuery userinfo FREEFORM "SELECT
username,passwd,uid,gid,homedir,shell FROM ftpusers WHERE username = '%U'"
proftpd

SQLUserInfo custom:/userinfo

 

I have a solution for 

1.  monthy up-/download see "delete_oke1, delete_oke2" Date_format can
not be used because some "%" overwrite with the defaults of proftpd sql
var's  
2.  fail amounts
3.  block a period of time for login
4.  block always after a date
5.  SQLUserInfo custom:/userinfo is for a timeclock to login only am or
pm etc.etc.

 

Do you have a solution for MaxStoreFileSize is proftpd sql.

I mis uid and gid in quota.conf, because i want the user name to replace the
uid. This metadata technic is better.

Proftpd sql var for gid

 

Hope to hear from you soon

Best Regast

Frank Bellen

Dutch

 

 

 




 

#

# Proftpd sample configuration for SQL-based authentication.

#

# (This is not to be used if you prefer a PAM-based SQL authentication)

#

#http://www.proftpd.org/docs/contrib/mod_quotatab_sql.html



   QuotaEngine on

   

   Include /etc/proftpd/sql_quota.conf

 

   AuthPAMConfig proftpd

 

   #AllowStoreRestart   on

   #AllowRetrieveRestarton

 

   #Update count every time a user logs in

   # server_ip='%V'

   #SQLUserWhereClause "not disabled = 1"

   #SQLGroupWhereClause "not disabled = 1"

 

   #Logging of MySql

   SqlLogFile /var/log/proftpd/sql.log

 

   #create a user's home directory on demand if it doesn't exist

   #CreateHome on

 

   SQLBackendmysql

 

   #Type of Passwords in MySQL are OpenSSL Crypt Plaintext Empty Backend

   SQLAuthTypes Plaintext

 

   #SQLAuthenticate users groups

 

   SQLEngine on

   SQLAuthenticate on

   #SQLAuthenticate user* group*

 

   #used to connect to the database 

   #databasename@host database_user user_password

   SQLConnectInfo  proftpd@localhost proftpd (*Bn185961.*)

   SQLNamedConnectInfo proftpd mysql proftpd@localhost:3306 proftpd
(*Bn185961.*)

 

   #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 ftpuser username passwd uid gid homedir shell

   SQLUserWhereClause "Active = 1 and disabled = 0 and username<>'-' and
(failmax = 0 or failcount < failmax)  and (loginafter is null or (loginafter
< now() and faillock = 1) or faillock = 0) and (loginexpired is null or
loginexpired < now())"

 

   # 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

 

   SQLGroupInfoftpgroup groupname gid members

   SQLGroupWhereClause "disabled = 0"

 

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

   SQLMinID500

 

   #display last login time when PASS command is given

   SQLNamedQuery login_time SELECT "modified from ftpuser where
username='%U' and disabled = 0 and Active = 1"

   SQLShowInfo PASS "230" "Last login was: %{login_time}"

 

   # Update count every time user logs in

   SQLLog PASS updatecount

   SQLNamedQuery updatecount UPDATE "failcount = 0,count=count+1,
accessed=now() WHERE username='%U'" ftpuser

 

   #logout log

   SQLLog EXIT time_logout

   SQLNamedQuery time_logout UPDATE "modified=now() WHERE username='%U' and
disabled = 0 and active = 1" ftpuser

 

   # Update modified everytime user uploads or deletes a file

   SQLLog  STOR,DELE modified

   SQLNamedQuery modified UPDATE "modified=now() WHERE username='%U'"
ftpuser

 

   #login attempts

   SQLLog ERR_PASS log_fails0 IGNORE_ERRORS

   SQLNamedQuery log_fails0 FREEFORM "UPDATE ftpuser set failcount =
failcount + 1 WHERE username = '%U' and disabled = 0 and active = 1 and
failmax > 0" proftpd

 

   SQLLog ERR_PASS log_fails1 IGNORE_ERRORS

 SQLNamedQuery log_fails1 FREEFORM "UPDATE ftpuser set disabled = 1
WHERE username = '%U' and failcount > failmax - 1 and active = 1 and failmax
> 0" proftpd

 

   SQLLog ERR_PASS log_fails2 IGNORE_ERRORS

 SQLNamedQuery log_fails2  UPDATE "loginafter = DATE_ADD(NOW(), INTERVAL
loginafterhour HOUR) WHERE username='%U' and disabled = 1 and active = 1 and
faillock = 1" ftpuser

 

   SQLLog ERR_PASS log_fails3 IGNORE_ERRORS

 SQLNamedQuery log_fails3 FREEFORM "UPDATE ftpuser set