NcFTPd general.cf file configuration
Don't forget to restart NcFTPd after modifying the general.cf file.
If a file is transferred in ASCII mode, then the server needs to read through the entire file and convert it on-the-fly before sending it to the client. The FTP protocol requires that the SIZE command return the number of bytes that would be sent, including the conversion. Therefore, if a SIZE is requested while in ASCII mode, the server needs to convert the entire file internally in order to return the number of bytes to the client. Contrast with binary mode, where a SIZE command can simply query the current size of the file without processing the file.
This option is available to reduce the potentially performance-degrading effects of the SIZE command in ASCII mode (Note: this option has no effect for binary transfers, since there is no performance penalty). Several modes are available for this option:
Mode 0: Do not allow the SIZE command when the client is in ASCII mode, and return an error code instead.
Mode 1: Process the entire file, no matter how large it is, and return the number of bytes required for the resulting converted file that would be sent to the client.
Mode 2: Return the size of the file stored locally, and do not compute the converted size. This mode violates the FTP protocol, so is not recommended. It can be useful if your client programs always do TYPE I after issuing SIZE.
Mode -x: This lets you try to compute the converted size for small files, but return an error for large files, so is a hybrid of modes 1 and 2. To use this, you specify the size threshold, so for example if you want to allow SIZE for text files less than 100000 bytes, but return an error for files 100000 bytes and larger, you would specify