# Misc

Misc, a section of [Preferences](Prefs.md), holds the settings that belong to no other section: how the server behaves towards FTP and SFTP clients, defaults, zip files, events, limits, the key for country lookups, defaults for S3 storage and the levels of the low memory alerts. Most of them never need to be changed.

![The Misc section](Prefs-Misc/section.png)

The ten panels are one page: **Save** at the bottom saves them all ([saving](Prefs.md#saving)).

A few settings are kept from earlier versions and no longer do anything. They are marked "not used" below.

## General

![The General panel](Prefs-Misc/general.png)

| Setting | What it does | Default |
|---|---|---|
| **Beep when users connect?** | the server machine beeps at every new connection | off |
| **Always do RETR in BINARY?** | FTP downloads are sent byte for byte, even when the client asked for text mode (ASCII) | off |
| **Always do STOR in BINARY?** | the same for FTP uploads | off |
| **Check for New Versions** | the server looks from time to time whether a newer version exists | on |
| **Allow extended passive and port command : EPSV** | offers the FTP command EPSV, which FTP over IPv6 needs | on |
| **Allow extended passive and port command : EPRT** | offers the FTP command EPRT | on |
| **Allow Directory Caching** | not used | off |
| **Use 'ls -la' for directory listings (macOS, Unix, Linux)** | folders of the server machine are listed with the system's own `ls -la`, which gives the real owner, group and permissions of each file. Slower than the built-in listing. | off |
| **Count folder items** | a listing shows, as the size of a folder, how many items it holds | off |
| **Slow Down Hack Attempt Scans?** | after ten failed commands in one session, every further failure is answered later, a tenth of a second more each time. A program that tries path after path gets slower and slower. | on |
| **Disable Referer Cookie** | not used | off |
| **Auto IP discovery** | the server finds out the public address it is reachable under, which FTP passive mode has to tell the client | on |
| **refresh interval in minutes** | how often it looks again | 60 |

## Protocol Behavior

![The Protocol Behavior panel](Prefs-Misc/behavior.png)

| Setting | What it does | Default |
|---|---|---|
| **Allow local passive IP?** | in FTP passive mode a client on the server's own network is given the server's local address, not the public one | on |
| **Allow MLST?** | offers the FTP commands MLST and MLSD, the listing made for programs | on |
| **Allow 0 byte SSH file?** | over SFTP, a file opened for writing exists at once, empty, before the first data arrives | on |
| **Case sensitive list search?** | an FTP listing with a pattern, such as `LIST *.TXT`, looks at upper and lower case | off |
| **Create home folder?** | at login the user's home folder is made when it does not exist. Can also be set on a single user. | off |
| **Fix Slashes?** | backslashes in the paths an FTP client sends are read as slashes | on |
| **Instant chmod?** | not used | off |
| **List zip app?** | a macOS application, which is a folder whose name ends in `.app`, is listed as one file `name.app.zip` and downloads as a zip | on |
| **MDTM GMT** | the FTP command MDTM gives and takes file times in GMT, not in the server's time zone | off |
| **POSIX** | after an upload to a folder of the server machine, the file gets the owner, the group and the permissions set for that folder | on, off on Windows |
| **RFC Proxy?** | when a user's storage is another FTP server and a transfer fails there, the client gets that server's own answer line | off |
| **Recurse SFTP Delete?** | over SFTP, removing a folder that is not empty removes everything in it. Off: the client is told the folder is not empty. | off |
| **Show Date-Time?** | not used | on |
| **Site acknowledgement?** | not used | off |
| **Sort Listings?** | FTP listings are sorted by name | off |
| **Track Last Logins** | the time of each login is stored on the user, so that you can see when an account was last used | on |
| **DMZ only listens for connections from master ServerBeat server** | on a DMZ server: of two internal servers with ServerBeat, only the one that holds the shared address is accepted | off |
| **Pre-check PGP decrypt on the fly downloads?** | before a download is decrypted on the fly, the server looks whether the file really is PGP data | on |

## Defaults and Logging

![The Defaults and Logging panel](Prefs-Misc/defaults.png)

| Setting | What it is | Default |
|---|---|---|
| **Default privs for new VFS items in User Manager** | the permissions a folder gets when you add it to a user in the User Manager, in the form the server stores them | `(read)(view)(resume)` |
| **Log Date / Time Format** | how the date and time at the start of each log line are written. `MM` month, `dd` day, `yy` or `yyyy` year, `HH` hour of 24, `hh` hour of 12, `mm` minute, `ss` second, `SSS` millisecond, `a` am or pm. | `MM/dd/yyyy HH:mm:ss.SSS` |
| **Default 'owner' of settings files**, **Default 'group' of settings files** | on macOS, Unix and Linux: the owner and the group the server gives the files it writes for itself, such as settings and users. Empty: they belong to the account the server runs as. | empty |
| **HTTP Redirect Base** | a link to the login page can name an address to go on to after the login. The server only follows it when the address starts with this text, such as `https://files.example.com/`. `DISABLED`: no such address is followed. | `DISABLED` |
| **Keep x backups of users in User Manager** | how many earlier versions of users the server keeps as backups | 100 |

## Zip and Transfers

![The Zip and Transfers panel](Prefs-Misc/zip.png)

| Setting | What it does | Default |
|---|---|---|
| **Zip Compression Level** | how hard the server compresses the zip files it makes for downloads: **Best**, **Fast** or **None**. None only packs, and is the fastest. | Best |
| **Zip64** | lets those zip files be larger than 4 GB, using the Zip64 form where it is needed | off |
| **Zip64 Always** | writes every zip file in the Zip64 form | off |
| **Disable MDTM modifications** | clients cannot set the date of a file. Can also be set on a single user. | off |
| **Allow '.zipstream' Expansion** | an upload whose name ends in `.zipstream` is unpacked while it arrives: its files are stored, not the zip. Can also be set on a single user. | on |
| **Delete partial uploads.** | an upload that breaks off is deleted. Off: the part that arrived stays, and can be resumed. Can also be set on a single user. | off |
| **Allow Magic '.filetree' Download** | a download of the special name `:filetree` in a folder gives the list of everything under it | on |
| **Allow listing subdirectories via LIST.** | on: an FTP listing of names only gives folder names as they are. Off: a slash is added after each folder name. | on |

## Events and Jobs

![The Events and Jobs panel](Prefs-Misc/events.png)

| Setting | What it does | Default |
|---|---|---|
| **Allow re-use in Email Events** | a file that one event has already reported can be reported by another event too. Off: each file is reported once. | on |
| **Send listings multithreaded** | a folder listing is gathered in a thread of its own while it is being sent | on |
| **Run Events Asynchronously** | events run in the background, and the user's session does not wait for them. This is for events set to "auto"; an event can say yes or no itself. | off |
| **Merge events across all inherited users.** | a user gets the events of every user it inherits from, added together | off |
| **Encrypt job files sensitive data** | passwords and other secrets in the stored files of jobs are encrypted | on |
| **Maximum jobs to scan for job monitor** | how many finished job runs the job monitor reads at most | 300 |

More settings for events are in [General Settings](Prefs-General.md#events-settings).

## Logins and Advanced

![The Logins and Advanced panel](Prefs-Misc/advanced.png)

| Setting | What it does | Default |
|---|---|---|
| **Remember invalid usernames for x seconds: … after … attempts** | a user name that failed to log in more than this many times is refused for this many seconds without being checked again. Slows down guessing. Names in **Never block usernames** ([Banning](Prefs-Banning.md#hammering)) are left out. | 60 seconds, 3 attempts |
| **Force Lowercase Usernames** | a user name typed at the web login is turned to lower case, so that `Alex` and `alex` are the same account | off |
| **WebDAV Timezone Offset** | not used | 0 |
| **File transfer mode** | the mode an FTP session starts in: `BINARY` or `ASCII` | `BINARY` |
| **Max Threads** | the most things the server does at the same time. Raise it only on a large server that reports running out of threads. | 2000 |
| **Unsafe filename characters** | every character listed here is replaced by `_` in the name of a file uploaded through the web | empty |
| **Unsafe folder characters** | the same for folders made through the web | empty |
| **Restart Command** | not used | empty |
| **Trusted IP Parts** | a web session belongs to the address it was started from. This is how many of the four parts of that address must stay the same. 4: the whole address. 3: the last part may change, for users whose provider moves them between neighbouring addresses. | 4 |
| **Test RegEx** | opens [the pattern tester](Prefs-Misc-Regex-Tester.md) | |

## Startup and Limits

![The Startup and Limits panel](Prefs-Misc/startup.png)

| Setting | What it is | Default |
|---|---|---|
| **Server Start Message** | the second line an FTP client gets when it connects, after the FTP welcome message of [General Settings](Prefs-General.md#the-general-settings-panel) | `CrushMFT Server Ready!` |
| **Giant directory alert (items)** | a folder listing with more items than this raises the alert **Big Directory** ([Alerts](Prefs-Alerts.md#the-server)) and an error in the log. Very large folders can use up the server's memory. -1: no limit. | -1 |

## Geo IP

![The Geo IP panel](Prefs-Misc/geoip.png)

| Setting | What it is |
|---|---|
| **GeoIP access key (ipstack)** | your key for the service ipstack.com, which tells the server the country of an address. It is needed for [banning by country](Prefs-Banning-Countries.md); without a valid key no country is checked. The key is stored encrypted. |
| **Test Geo IP** | asks for an address and shows what the service answers for it |
| **Get an access key** | opens the sign-up page of ipstack |

**Test Geo IP** uses the key as it is saved. With unsaved changes on the page it asks first: **Save and test**, or **Test saved settings**.

![Asking for the address to test](Prefs-Misc/geoip-prompt.png)

The answer appears in the panel. Without a key it is:

![The answer without a key](Prefs-Misc/geoip-result.png)

## S3 Configuration

Defaults for storage on S3. A storage item that sets one of these itself keeps its own value.

![The S3 Configuration panel](Prefs-Misc/s3.png)

| Setting | What it is | Default |
|---|---|---|
| **Max Download Buffer** | the most memory, in MB, one download from S3 may hold | 100 |
| **Download Buffer** | the size, in MB, of the pieces a download is fetched in | 5 |
| **Download Threads** | how many pieces of one download are fetched at the same time | 3 |
| **Upload Buffer** | the size, in MB, of the parts an upload is sent in | 5 |
| **Upload Threads** | how many parts of one upload are sent at the same time | 3 |
| **Replicated?** | what the server records about S3Crush storage is passed on to the other servers of a cluster | on |
| **Disable uploads in progress and resume** | uploads to S3 that are still running are not listed and cannot be resumed | off |
| **Enable IMDSv2** | on an Amazon EC2 machine, credentials are fetched from the instance with the newer, token-based method (IMDSv2) | off |
| **EC2 Use relative URL** | in an Amazon container, credentials are fetched from the address the container is given (the container credentials relative URI) | off |

Larger buffers and more threads make transfers of large files faster and use more memory: a transfer can hold its buffer once for every thread.

## Virus scanning (ICAP)

![The Virus scanning (ICAP) panel](Prefs-Misc/icap.png)

Uploads are handed to an ICAP server, a virus scanner that is asked over the network, before they are kept. A job's own transfers are not scanned.

| Field | What it does | On a new server |
|---|---|---|
| **Scan uploads with an ICAP server** | turns the scanning on | off |
| **ICAP server** | the scanner's host and port, such as `scanner.example.com:1344` | empty |
| **ICAP service name** | the service that is asked for on the scanner | `avscan` |
| **Do not scan files larger than** | an upload above this size is not sent to the scanner | 104857600 bytes (100 MB) |

The keys are `icap_scanning`, `icap_server_host_port`, `icap_service` and `icap_max_bytes`.

## Custom data

![The Custom data panel, with one row typed](Prefs-Misc/custom-data.png)

Named values of your own, for messages, events and jobs. A row named `region` is written `{customData_region}` wherever the server replaces variables. **Add** makes a row, the bin at the end of a row takes it out, and **Save** stores the table as it stands: a row that is no longer in the table is gone from the server too. The key is `customData`.

## Low Memory Alerts

How full the server's memory must be for each level of the low memory [alerts](Prefs-Alerts.md#the-server). Drag a slider; it shows the percentage in use and what remains.

![The Low Memory Alerts panel](Prefs-Misc/memory.png)

| Level | Fires at | Default |
|---|---|---|
| **Warning Level** | this much of the memory in use | 60% |
| **Important** | | 70% |
| **Critical/Urgent** | | 80% |
