Options

Documentation Options

The moftpd config file is built in a fashion similar to that of Apache, except that whitespace is not important at all (newlines end comments but nothing else). You could write the entire config file on one line if you so wish.

Comments

Comments are started by # and lasts to the end of line.

Inheritance

Options marked with "Inherited: yes" (which is most of them), are inherited to subtags that can contain them. For example

  <server global-settings>
    SQLConnect mysql, localhost, moftpd, ftpsites
    SQLUserQuery "select * from users where name = %u"

    <server real-server>
      ...
    </server>
  </server>
Here real-server will do SQL queries for users as well, as it inherits those options. However, options are only inherited if they are put above the subtag, so if the SQL options had been after the first </server> they would not have been inherited. The Reset option is useful to cancel the inherited effects.

Bools

Boolean options are on/off flags. You can put either yes, on or true to indicate a on value, and no, off or false to indicate an off value.

Numbers

For numbers you can append a character as a multiplier. K (kilobytes) for 1024, M (megabytes) for 1024 * 1024, G (gigabytes) for 1024 * 1024 * 1024, m (minutes) for 60, h (hours) for 60 * 60 and d (days) for 60 * 60 * 24.

Strings

Strings can be quoted or unquoted. Unquoted strings mustn't contain any of ; > , or whitespace and mustn't start with < # ' or ". Quoted strings start with " or ' and end with the same character. Repeating the quote twice lets you put it inside the string (example: "a ""quoted"" string"). Two quoted strings using the same quote placed after eachother (with only whitespace between) will be concatenated (example: "This is "  "a single string.").

Tags and options

Option and tag names are not case sensitive. They are located at four levels:

moftpd homepage