Vous n'êtes pas identifié(e).
Pages : 1
Je voudrais savoir si c'est possible avec proftpd ? J'imagine que oui mais impossible de trouver comment, j'ai essayé de me renseigner sur les modules de ratios qui sont dans le fichier proftpd.conf mais je n'ai pas réussi à comprendre quoique ce soit étant un grand débutant linuxien et d'administration de serveur.
J'appelle à votre culture et votre savoir-faire, si vous pouvez ne serait-ce que m'aiguiller ou me renseigner, je ne cherche qu'à apprendre !
Merci d'avance.
Dernière modification par Sino1 (11-12-2019 22:53:51)
Hors ligne
Tousse antique Ovide !
Hors ligne
qui limite les données uploadés à 200Go pour l'utilisateur, c'est pas mal mais si c'est de l'upload ca veut dire que si il supprime des données, cela va rester dans son quotas ?? Je comprend pas bien exactement
Après tu parles de quotas implémentés directement au niveau du système de fichier ? Tu pourrais m'en dire plus ? Ca serait possible de limiter la taille d'un dossier à une certaine taille donnée, cela serait parfait aussi et peut-être plus simple à mettre en place ?
Hors ligne
Après tu parles de quotas implémentés directement au niveau du système de fichier ? Tu pourrais m'en dire plus ?
Voir là : https://debian-facile.org/doc:systeme:quota.
Sinon, une solution a priori moins fiable mais plus simple à mettre en œuvre, avec pure-ftpd tu peux mettre en place des quotas par utilisateur (je n’ai encore jamais essayé).
------------------------ VIRTUAL QUOTAS ------------------------
With virtual quotas, you can restrict the maximum number of files and the
total size of a user directory.
These quotas are "virtual" because they aren't handled at kernel-level, but
by the FTP server itself. There are some advantages over kernel quotas:
- Virtual quotas are specific to the FTP server. You can have different
system quotas to handle other files (eg. mail) on the same partition.
- You can have different virtual quotas for every user, even if they share
the same system uid.
- Virtual quotas are working even on filesystems that don't support system
quotas.
However, virtual quotas are slower and can't be as reliable as kernel quotas,
so don't trust them ultimately, they are probably races allowing to bypass
them. Also the filesystem users directories are on must properly support file
locking.
Virtual quotas are implemented in Pure-FTPd as simple files called
".ftpquota", located in the home directory of chrooted users. This file only
contains two numbers: the current number of files for this user and the
total size of the directory (+ its subdirectories), in bytes. When a new
file is uploaded, these numbers grow. When a file is deleted, these numbers
get smaller. Simple. Of course, when virtual quotas are enabled for one
user, that user must be 1) chrooted, 2) not allowed to write quota files, 3)
not allowed to forbid access to some directories to fool the counter.
Quotas can be enabled for all users for the -n (--quotas) option. This
option is followed by the max number of files and the max size (in Megabytes)
. Every user will have the same quota. Exception: members of the trusted
group, if -a is enabled.
You can also have different quotas for every user if you use PureDB or SQL
databases. See the "README.Virtual-Users" file for more info about PureDB
databases.
So, if you want 1000 files max and 10 Mb max for all your customers, run
the server like this:
/usr/local/sbin/pure-ftpd -n 1000:10
".ftpquota" files are created on demand when they are missing. However, when
they are created, the server assumes that the account was empty. If this is
not the case, you must run the "pure-quotacheck" utility to create an
initial ".ftpquota" file.
"pure-quotacheck" is a tool that computes the size and the number of files
in a directory and create a ".ftpquota" file with this info.
The syntax is:
pure-quotacheck -u username/uid -d home directory [-g group/gid]
For instance, if you want to summarize usage for the /home/ftpusers/john
directory, whose files are owned by the "ftpusers" system account, just run:
pure-quotacheck -u ftpusers -d /home/ftpusers/john
You can run pure-quotacheck whenever you want, even when ".ftpquota" files
are already there. This is even a good idea to run this for all users in
crontab, so that stored quotas are always exact, even if something went wrong
(server bug, filesystem corruption, savagely killed server, etc) .
Dernière modification par Philou92 (07-12-2019 14:17:48)
Tousse antique Ovide !
Hors ligne
Hors ligne
Pages : 1