Re: [Proftpd-user] Limit download count per file and user and period

Anton Luka Šijanec <[email protected]>
Newsgroups gmane.network.proftpd.user
Message-ID <-6fbgad-z6ufrdhte2tt-xnnrxypgg515-n8kqk1-j6e1b6xaqemm-f6n004bzuzjf-rstwsw6higmvwhux1s2y35ji5do5ov-ro20oe-52zd3f-xj3w4i843gcfyzye4iyqs9p85hghvbhny4krtdy8fj.1593184699154@email.android.com>
Hello!

If you do not manage to find another solution, you can try to write your own scripts to modify counters in your user SQL table. You can achieve that through mod_exec.

You can use ExecOnCommand on a small C script on the READ command (it will only be used if READ was successful) that makes an SQL query.

In unistd.h there is a function:
int getlogin_r(char *buf, size_t bufsize);
which you can use to get the username, because the script is ran as the user that is logged in (probably for security reasons).

mod_exec link: http://www.proftpd.org/docs/contrib/mod_exec.html

regards and good luck!

--
Anton Luka Šijanec
https://sijanec.eu/
+386 64/176-345
[email protected] (mail & xmpp)
https://sijanec.eu/pgp-key.txt

-------- Original Message --------
Subject: [Proftpd-user] Limit download count per file and user and period
From: "Block, Clemens"
To: [email protected]
CC:







Hi Group!




Has anybody a solution to limit downloads per file and user and time period?


That means for more than one session (as mod_quotatab do).



Details:

We are delivering asset data to a high amount of user.

Data are updated weekly, but all data stayed in the same folder.

User get report about changed data and should be able to download new files.

But we want to prevent (due to bandwith and data transfer costs),


that user downloads all data again and again for convenience.


Therefore we would like to limit downloads per file and user.

Maybe only three times a month or so.


Of course we could run external jobs to manipulate counter, which means


counter resetting must not be part of the base function.





Environment:


We are using ProFTPd 1.3.6 with a mysql databases as user and log backend




Thx in advance for your hints


Clemens

_______________________________________________
ProFTPD Users List   <[email protected]>
Unsubscribe problems?
http://www.proftpd.org/list-unsub.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.