Options Property  
 

Gets and sets the options used when creating an instance of the server.

Syntax

object.Options [= value ]

Remarks

The Options property is an integer value which specifies one or more options. The value specified for this property will be used as the default options when starting the server. The property value is created by using a bitwise operator with one or more of the following values:

Value Constant Description
1 ftpServerMultiUser This option specifies the server should be started in multi-user mode, where users are provided with their own home directories based on their username. If this option is not specified, then all users will share the server root directory by default. This option does not affect the maximum number of simultaneous client connections to the server. To isolate users to their own individual home directory, combine this option with the ftpServerRestricted option.
2 ftpServerRestricted This option specifies the server should be initialized in a restricted mode that isolates the server and limits the ability for clients to access files on the host system. All file transfers are limited to the user's home directory. This option also disables certain site-specific commands. This is a recommended option for general purpose applications designed to accept connections from clients over the Internet. This option is only meaningful if the ftpServerMultiUser option has also been specified. All clients are restricted to the server root directory and its subdirectories, regardless of whether this option is specified or not.
4 ftpServerLocalUser This option specifies the server should perform user authentication using the Windows local account database. This option is useful if the server should accept local usernames, or if the application does not wish to implement an event handler for user authentication. If this option is not specified, the application is responsible for authenticating all users.
8 ftpServerAnonymous This option specifies the server should accept anonymous client connections. This is typically used to provide public access to files without requiring the client to have valid credentials on the server. Anonymous clients are automatically authenticated by the server, but are restricted to a public directory and subdirectories. If this option is enabled, it is recommended that you also specify the ftpServerReadOnly option to prevent anonymous clients from uploading files to the server.
16
(&H10)
ftpServerReadOnly This option specifies the server should only allow read-only access to files by default. If this option is enabled, it will change the default permissions granted to authenticated users. Anonymous clients will not be able to upload, rename or delete files and cannot create subdirectories. It is recommended that this option be enabled if the server is publicly accessible over the Internet and the ftpServerAnonymous option has been specified.
32
(&H20)
ftpServerLocalTime This option specifies the server should return file and directory times adjusted for the local timezone. By default, the server will return all file times as UTC values. This option affects the time information sent to a client when a list of files is requested, as well as when status information is requested for a specific file. This option will not affect the MDTM and MFMT commands which always use file times as UTC values.
64
(&H40)
ftpServerLockFiles
This option specifies that files should be exclusively locked when a client attempts to upload or download a file. If another client attempts to access the same file, the operation will fail. By default, the server will permit multiple clients to access the same file, although it will still write-lock files that are in the process of being uploaded.
128
(&H80)
ftpServerHiddenFiles
This option specifies that when a client requests a list of files in a directory, the server should include any hidden and system files files or subdirectories. By default, the server will not include hidden or system files, although they are still accessible to the client if it knows the name of the file. File names that begin with a period are also considered to be hidden files and will not normally be included in file listings.
256
(&H100)
ftpServerUnixMode
This option specifies the server should impersonate a UNIX-based operating system. The server will identify itself as running on a UNIX system and directory listings will be in a format commonly used by UNIX. If this option is not specified, the server will identify itself as running on Windows NT and directory listings will be in the same format used by the Microsoft IIS FTP server. Note that this option does not affect the path delimiter used with file and directory names.
512
(&H200)
ftpServerExternal
This option specifies the server is listening for client connections from behind a router that uses Network Address Translation (NAT). If enabled, the server will report its external IP address rather than the address assigned to it on the local network. For the server to accept connections from behind a NAT router, the router must be configured to direct inbound traffic to the specified port number on the host system.
4096
(&H1000)
ftpServerSecure
This option specifies that secure connections using TLS should be enabled. If neither the ftpServerExplicitTLS or ftpServerImplicitTLS options are specified, the server automatically determines the appropriate type based on the port number. If the local port number is 990, then implicit TLS will be used, otherwise explicit TLS will be used. This option requires that a valid TLS certificate be installed on the local host.
8192 ftpServerExplicitTLS
This option specifies the server will accept the AUTH TLS command and negotiate a secure connection with the client after that command is issued. This option implies the ftpServerSecure option and requires that a valid TLS certificate be installed on the local host.
16384
(&H4000)
ftpServerImplicitTLS
This option specifies the server should negotiate a secure connection with the client immediately after it connects to the server. It is recommended that you only use this option if the server is listening for connections on port 990, which is the standard port for FTP servers using implicit TLS. This option implies the ftpServerSecure option and requires that a valid TLS certificate be installed on the local host.
32768
(&H8000)
ftpServerSecureFallback
This option specifies the server should permit the use of less secure cipher suites for compatibility with legacy clients. If this option is specified, the server will allow connections using TLS 1.0 and cipher suites that use RC4, MD5 and SHA1.

Most of these options have a corresponding Boolean property. For example, the ftpServerRestricted option corresponds to the Restricted property, where setting the property to True enables the option and setting it to False disables the option.

In most cases, it is recommended that you use the property value related to the option, rather than setting the Options property. It will make your code more readable and prevent potential compatibility issues with subsequent versions of the control. If you do decide to specify option bitflags, it is recommended that you use the constant name rather than the numeric value.

Data Type

Integer (Int32)

See Also

HiddenFiles Property, LocalTime Property, LocalUser Property, LockFiles Property, MaxGuests Property, MultiUser Property, ReadOnly Property, Restricted Property, Secure Property, UnixMode Property, Start Method