Sidebar

What are the network share configuration parameters?

0 votes
2.8K views
asked Jun 28, 2019 by rich-c-2789 (16,180 points)
edited Jul 3, 2019 by rich-c-2789
I have several network shares that I connect to.  One of them keeps timing out.  Can I change the timeout for just that one using the network share configuration parameters?  Is there a list of all the available properties?

3 Answers

0 votes

These are the most common options or the most likely to be used.

--- Timeout Options ---

jcifs.smb.client.soTimeout

Default 35000

Socket timeout, in milliseconds Determines the socket timeout, that is the time period in milliseconds after which sockets are closed if there is no activity.

jcifs.smb.client.connTimeout

Default 35000

Timeout for establishing a socket connection, in milliseconds. Determines the connection timeout, that is the time period in milliseconds that the client waits to connect to a server.

jcifs.smb.client.sessionTimeout

Default 35000

Timeout for SMB sessions, in milliseconds Determines the timeout for SMB sessions, that is the time period in milliseconds after which the session is closed if there is not activity.

jcifs.smb.client.responseTimeout

Default 30000

Timeout for SMB responses, in milliseconds Determines the timeout for SMB responses, that is the time period in milliseconds that the client waits for the server to respond to a request.

--- List Options ---

jcifs.smb.client.listCount

Default 200

Maxmimum number of elements to request in a list request. Determines the maximum number of directories and files to be returned with each request of the TRANS2_FIND_FIRST/NEXT2 operation. The default value is 200. Depending on the characteristics of the files and directories on the SMB server, you might want to adjust this value for performance reasons. For example, on higher latency networks a lower value can result in better performance.

jcifs.smb.client.listSize

Default 65535

Maximum data size for list requests

answered Jun 28, 2019 by rich-c-2789 (16,180 points)
edited Jul 10, 2019 by rich-c-2789
0 votes

--- Misc. Options ---

jcifs.resolveOrder

Default LMHOSTS,DNS,WINS,BCAST

Order and selection of resolver modules

jcifs.encoding

Default Cp850

OEM encoding to use

jcifs.smb.allowNTLMFallback

Default true

Allow fallback from kerberos to NTLM

jcifs.smb.useRawNTLM

Default false

Whether to use raw NTLMSSP tokens instead of SPNEGO wrapped ones

jcifs.smb.lmCompatibility

Default 3

The lanman compatibility level. 1 = LM and NTLM, 2 = NTLM only, 3 = NTLMv2 only

jcifs.smb.maxBuffers

Default 16

Number of buffers to keep in cache

jcifs.smb.client.rcv_buf_size

Default 65535

Receive buffer size, in bytes

jcifs.smb.client.snd_buf_size

Default 65535

Send buffer size, in bytes

jcifs.smb.client.minVersion

Default SMB1

Minimum protocol version to use/allow. Options: SMB1, SMB202, SMB210, SMB300, SMB302, SMB311

jcifs.smb.client.maxVersion

Default SMB210

Maximum protocol version to use/allow.  Options: SMB1, SMB202, SMB210, SMB300, SMB302, SMB311

jcifs.smb.client.useSMB2Negotiation

Default false

Use SMB2 non-backward compatible protocol negotiation style.

jcifs.smb.client.requireSecureNegotiate

Default true

Enforce the use of secure negotiation. This does not provide any actual downgrade protection if SMB1 is allowed. It will also break connections with SMB2 servers that do not properly sign error responses.

jcifs.smb.client.signingPreferred

Default false

Enable SMB signing (for everything), if available Enables SMB signing if available. If the SMB server requires SMB signing, you must set this property to true to have the data server and a JCIFS client negotiate SMB signing with that SMB server. If the SMB server does not require SMB signing but supports it, you can set this property to true for signing to occur. Otherwise, SMB signing is disabled.

jcifs.smb.client.ipcSigningEnforced

Default true

Enforce SMB signing for IPC connections. Determines whether client signing for interprocess communication (IPC) connections is enforced. This means that, although the data server is configured with signing not being required and not being supported, IPC connections to the SMB server still require signing by default. If the SMB servers does not support signing for IPC connections, the data server cannot connect to that server during volume creation unless you set this property to false.

jcifs.smb.client.signingEnforced

Default false

Enforce SMB signing (for everything) Determines whether client signing in general is enforced. The default value is false. If the SMB server does not require and does not support signing, setting this property to true causes the connection to the SMB server to fail. Only set this property to true if one of these security policies is set on the SMB server: ◦ Microsoft network server: Digitally sign communication (always) ◦ Microsoft network server: Digitally sign communication (if client agrees)

jcifs.smb.client.port139.enabled

Default false

Enable failover to legacy transport on port 139

jcifs.smb.client.useUnicode

Default true

Announce support for unicode

jcifs.smb.client.forceUnicode

Default false

Whether to use unicode, even if the server does not announce it

jcifs.smb.client.useBatching

Default true

Enable support for SMB1 AndX command batching

jcifs.smb.client.nativeOs

Default os.name

OS string to report

jcifs.smb.client.nativeLanMan

Default jCIFS

Lanman string to report

jcifs.smb.client.lport

Default 0

Local port to use for outgoing connections

jcifs.smb.client.laddr

Local address to use for outgoing connections

jcifs.smb.client.logonShare

Share to connect to during authentication, if unset connect to IPC$

jcifs.smb.client.domain

Default credentials, domain name

jcifs.smb.client.username

Default credentials, user name

jcifs.smb.client.password

Default credentials, password

jcifs.smb.client.capabilities

Default 0

Custom capabilities. 0 = use default capabilities

jcifs.smb.client.flags2

Default 0

Custom flags2, 0 = use default flags

jcifs.smb.client.ssnLimit

Deafult 250

Maximum number of sessions on a single connection

jcifs.smb.client.disablePlainTextPasswords

Default true

Whether the usage of plaintext passwords is prohibited

jcifs.smb.client.maxMpxCount

Default 10

Maximum count of concurrent commands to announce

jcifs.smb.client.encryptionEnabled

Default false

This is an experimental option allowing to indicate support during protocol negotiation, SMB encryption is not implemented yet. Enable SMB encryption.  For more information regarding SMB encryption see this link.

jcifs.smb.client.forceExtendedSecurity

Default false

Force extended security usage

jcifs.smb.client.transaction_buf_size

Default 65535

Maximum data size for SMB transactions

jcifs.smb.client.attrExpirationPeriod

Default 5000

Timeout of file attribute cache

jcifs.smb.client.ignoreCopyToException

Default false

Ignore exceptions that occur during file copy

jcifs.smb.client.notify_buf_size

Default 1024

The size of the requested server notify buffer

jcifs.smb.client.maxRequestRetries

Default 2

Retry SMB requests on failure up to n times

jcifs.smb.client.strictResourceLifecycle

Default false

If enabled, SmbFile instances starting with their first use will hold a reference to their tree. This means that trees/sessions/connections won't be idle-disconnected even if there are no other active references (currently executing code, file descriptors). Depending on the usage scenario, this may have some benefit as there won't be any delays for reestablishing these resources, however comes at the cost of having to properly release all SmbFile instances you no longer need. whether to use strict resource lifecycle

jcifs.smb.client.disableSpnegoIntegrity

Default false

Disable sending/verifying SPNEGO mechanismListMIC

jcifs.smb.client.enforceSpnegoIntegrity

Default true

Enforce verifying SPNEGO mechanismListMIC

answered Jul 5, 2019 by rich-c-2789 (16,180 points)
edited Jul 10, 2019 by rich-c-2789
0 votes

--- DFS Options ---

jcifs.smb.client.dfs.disabled

Default false

Whether DFS lookup is disable Disables Distributed File System (DFS) referrals. In non-domain environments, you might want to set this property to true to disable domain-based DFS referrals. Domain-based DFS referrals normally run when the data server and a JCIFS client first tries to resolve a path. In non-domain environments, these referrals time out causing a long startup delay.

jcifs.smb.client.dfs.ttl

Default 300

Title to live, in seconds, for DFS cache entries

jcifs.smb.client.dfs.strictView

Default false

Whether an authentication failure during DFS resolving will throw an exception

jcifs.smb.client.dfs.convertToFQDN

Default false

Whether to convert NetBIOS names returned by DFS to FQDNs. Enable hack to make kerberos auth work with DFS sending short names. This works by appending the domain name to the netbios short name and will fail horribly if this mapping is not correct for your domain.

--- Netbios Options ---

jcifs.netbios.hostname

Local NETBIOS/short name to announce

jcifs.netbios.baddr

Default 255.255.255.255

Broadcast address to use

jcifs.netbios.wins

WINS server to use

jcifs.netbios.lport

Default 0

Local bind port for netbios connections

jcifs.netbios.laddr

Local bind address for netbios connections

jcifs.netbios.soTimeout

Default 5000

Socket timeout for netbios connections, in milliseconds

jcifs.netbios.lmhosts

The lmhosts file to use

jcifs.netbios.scope

Default netbios scope to set in request

jcifs.netbios.snd_buf_size

Default 576

The netbios send buffer size

jcifs.netbios.rcv_buf_size

Default 576

The netbios recieve buffer size

jcifs.netbios.retryTimeout

Default 3000

Timeout of retry requests, in milliseconds

jcifs.netbios.retryCount

Default 2

Maximum number of retries for netbios requests

jcifs.netbios.cachePolicy

Default 600

Netbios cache timeout, in minutes, 0 - disable caching, -1 - cache forever

answered Jul 5, 2019 by rich-c-2789 (16,180 points)
edited Jul 5, 2019 by rich-c-2789
...