ListOptions
The ListOptions directive of ProFTPD can be used to control how directory listings are generated. Directory listings are sent in response to the LIST and NLST FTP commands.
LIST
NLST
The ListOptions directive supports the following options:
-t
Although not strictly supported by the FTP RFCs, many FTP clients send these options with the LIST and 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:
ListOptions -a
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 proftpd scans all of the files. For this reason, some sites may wish to prevent the -R option from being used. ListOptions supports 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:
-R
proftpd
ListOptions +R strict
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 "strict"--it causes proftpd to ignore any -R option the client might send.
strict
+R
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
If you are not using the --enable-nls configure option, and you want to see non-printable characters in filenames when listing directories, you should use:
--enable-nls
ListOptions -B
The following keywords are supported, in addition to "strict":
STAT
LIST/NLST
ListOptions -a maxfiles 2000 maxdepth 3
-a
Or perhaps you want the one-file-per-line format, but only for NLST commands and not LIST commands. You would thus use something like:
ListOptions "-1" strict NLSTOnly
Note that <Limit> sections can be used to block the LIST and NLST commands altogether.
<Limit>