dirCreateMode

Sets the creation mode for directories that are automatically generated.

This parameter applies to omfile: File Output Module.

Name:

dirCreateMode

Scope:

module, action

Type:

string (octal)

Default:

module=0700; action=inherits module

Required?:

no

Introduced:

at least 5.x, possibly earlier

Description

Sets the file system permissions for directories automatically created by omfile. The value must be a 4-digit octal number (e.g., 0700).

When set at the module level, it defines the default mode for all omfile actions. When set at the action level, it overrides the module default for that specific action.

Please note that the actual permissions depend on rsyslogd’s process umask. If in doubt, use $umask 0000 at the beginning of the configuration file to remove any restrictions.

Module usage

module(load="builtin:omfile" dirCreateMode="0700")

Action usage

action(type="omfile" dirCreateMode="0755" ...)

Legacy names (for reference)

Historic names/directives for compatibility. Do not use in new configs.

  • $DirCreateMode — maps to dirCreateMode (status: legacy)

See also

See also omfile: File Output Module.


Support: rsyslog Assistant | GitHub Discussions | GitHub Issues: rsyslog source project

Contributing: Source & docs: rsyslog source project

© 2008–2025 Rainer Gerhards and others. Licensed under the Apache License 2.0.