ListOptions directive of ProFTPD can be used
to control how directory listings are generated. Directory listings are
sent in response to the
NLST FTP commands.
ListOptions directive supports the following options:
Although not strictly supported by the FTP RFCs, many FTP clients send these
options with the
NLST commands, and many
FTP servers honor them. The
ListOptions directive configures
default options to be used, in addition to any sent by the client. For
example, to show all files except the "hidden" files for clients,
you could use:
Another use of
ListOptions is to prevent certain options
from being used. The
-R option, for recursively listing
all subdirectories, can use a lot of system resources, especially on very
large and/or very deep directory structures, as
all of the files. For this reason, some sites may wish to prevent the
-R option from being used.
this with use of the "+" character. Options are enabled using the
"-" character, thus they are disabled using "+"--think
of the "+" as cancelling out the "-". For example:
ListOptions +R strictwould disable all use of the
Where did the
strict come from in the example above?
ListOptions configures a set of default options, but if a client
sends its own directory options,
proftpd will use the client's
options instead. To ignore the client options and use only the
ListOptions configured, one uses the "strict" keyword.
That is why the
+R example above required
proftpd to ignore any
-R option the client might send.
What if you wanted to enable some options and disable others in the same
ListOptions directive? You would surround your options in quotation marks, like so:
ListOptions "-a +R" strict
The following keywords are supported, in addition to "strict":
-Roption is allowed
ListOptions -a maxfiles 2000 maxdepth 3This configures the
-aoption by default, and limits the maximum files in the generated listing to 2000. If the client uses the
proftpdwill not recurse into directories more than 3 levels deep when generating the listing.
<Limit> sections can be
used to block the
NLST commands altogether.