Software: Apache. PHP/8.1.30 uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root) Safe-mode: OFF (not secure) /usr/share/doc/proftpd-doc/howto/ drwxr-xr-x |
Viewing file: Select action/file-type: ProFTPD: Globbing
What is Globbing? A string is a wildcard pattern if it contains one of the characters `?', `*' or `['. Globbing is the operation that expands a wildcard pattern into the list of pathnames matching the pattern. Matching is defined by: A `?' (not between brackets) matches any single character. A `*' (not between brackets) matches any string, including the empty string.The RFCs that define FTP do not explicitly mention globbing; this means that FTP servers are not required to support globbing in order to be compliant. However, many FTP servers do support globbing (including ProFTPD), as a measure of convenience for FTP clients and users.
The ftp> mget *.gzor: ftp> mget pub/music/*.mp3Other FTP clients may have similar client-side commands for listing and retrieiving multiple files based on globbing expressions.
Why Globbing is an Issue http://bugs.proftpd.org/show_bug.cgi?id=1066The above bug report shows an example of a globbing expression that was used to attempt a DoS by means of many directory levels.
Some servers (e.g.
Every now and then, this issue is reported on various mailing lists. As
some system resources are needed when handling globbing expression,
some users report this as a DoS possibility. Which is why
Globbing Restrictions UseGlobbing off
If, on the other hand, your site does need to support globbing (many
FTP users will assume that globbing is supported), there are other ways of
limiting the amount of resources used when globbing: the
RLimitCPU session ... RLimitMemory session ...And, for the paranoid system administrator, a way of limiting the number of directories supported in a globbing expression was added in 1.2.8rc1 : PR_TUNABLE_GLOBBING_MAX_RECURSION . By default, the maximum
number of levels supported is 8 (this is the hardcoded default in the GNU
library implementation of globbing). To change this to a lower number, compile
proftpd using a configure line that looks
something like this:
$ ./configure CFLAGS="-DPR_TUNABLE_GLOBBING_MAX_RECURSION=3" ...A globbing expression that contains more than the maximum number of supported levels is not executed, but instead an error code signalling "out of memory" is immediately returned, which is GNU's way of saying that it will not handle the expression.
There is a similar limit on the maximum number of files that will be checked
for a glob expression. By default, this limit is 100000 (the hardcoded default
in the GNU library $ ./configure CFLAGS="-DPR_TUNABLE_GLOBBING_MAX_MATCHES=200000UL" ...A globbing expression that needs to examine more files than this limit will have the number of matches silently truncated to the limit (or just below).
© Copyright 2017 The ProFTPD Project All Rights Reserved |
:: Command execute :: | |
--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0037 ]-- |