rsyslog
  • About rsyslog
  • Getting Started with rsyslog
  • Configuration
    • Basic Structure
    • Output Modules
      • omamqp1: AMQP 1.0 Messaging Output Module
      • omawslogshlc: Amazon CloudWatch Logs HLC Output Module
      • omazuredce: Azure Monitor Logs Ingestion Output Module
      • omazureeventhubs: Microsoft Azure Event Hubs Output Module
      • omclickhouse: ClickHouse Output Module
      • omczmq: Output module for ZeroMQ
      • omdtls: Output Module for DTLS Protocol over UDP
      • omelasticsearch: Elasticsearch Output Module
      • omfile: File Output Module
        • Purpose
        • Notable Features
        • Configuration Parameters
        • Statistic Counter
        • Caveats/Known Bugs
        • Examples
      • omfwd: syslog Forwarding Output Module
      • omgssapi: GSSAPI Syslog Output Module
      • omhdfs: Hadoop Filesystem Output Module
      • omhiredis: Redis Output Module
      • omhttp: HTTP Output Module
      • omhttpfs: Hadoop HTTPFS Output Module
      • omjournal: Systemd Journal Output
      • omkafka: write to Apache Kafka
      • omlibdbi: Generic Database Output Module
      • ommail: Mail Output Module
      • ommongodb: MongoDB Output Module
      • ommysql: MariaDB/MySQL Database Output Module
      • omoracle: Oracle Database Output Module
      • omotel: OpenTelemetry output module
      • PostgreSQL Database Output Module (ompgsql)
      • ompipe: Pipe Output Module
      • omprog: Program integration Output module
      • omrabbitmq: RabbitMQ output module
      • omrelp: RELP Output Module
      • omruleset: ruleset output/including module (DEPRECATED)
      • omsendertrack: Sender Tracking Output Module
      • omsnmp: SNMP Trap Output Module
      • omstdout: stdout output module (testbench tool)
      • omudpspoof: UDP spoofing output module
      • omusrmsg: notify users
      • omuxsock: Unix sockets Output Module
      • GuardTime Log Signature Provider (gt)
      • Keyless Signature Infrastructure Provider (ksi)
      • KSI Signature Provider (rsyslog-ksi-ls12)
    • Input Modules
    • Parser Modules
    • Message Modification Modules
    • String Generator Modules
    • Library Modules
    • Templates
    • rsyslog Properties
    • The Property Replacer
    • Filter Conditions
    • RainerScript
    • Actions
    • Input
    • Parser
    • timezone
    • Examples
    • Legacy Configuration Directives
    • rsyslog statistic counter
    • Modules
    • Output Channels
    • Dropping privileges in rsyslog
    • Notes on IPv6 Handling in Rsyslog
    • libgcrypt Log Crypto Provider (gcry)
    • libossl Log Crypto Provider (ossl)
    • Dynamic Stats
    • Lookup Tables
    • Percentile Stats
    • Converting older formats to advanced
    • Configuration Formats
    • YAML Configuration Format
    • sysklogd format
    • Additional Resources
    • Compatibility Note
  • FAQ
  • Tutorials
  • Production Deployments
  • Troubleshooting
  • Concepts
  • Development
  • Reference
rsyslog
  • Configuration
  • Output Modules
  • omfile: File Output Module
  • followSymlinks
  • View page source

followSymlinks

Controls whether omfile follows a symbolic link in the final output path component.

This parameter applies to omfile: File Output Module.

Name:

followSymlinks

Scope:

module, action

Type:

boolean

Default:

depends on global(compatibility.defaults.secure=...)

Required?:

no

Introduced:

8.2608.0

Description

When set to on, omfile keeps the historic behavior and follows a symbolic link if the final component of the configured output path is a symlink. When set to off, omfile opens the final path component with O_NOFOLLOW where the platform supports it, so a symlinked output file is rejected instead of being followed.

If the parameter is not configured explicitly, the default follows global(compatibility.defaults.secure=...):

  • strict: do not follow the final output path component.

  • warn: follow the symlink and emit a warning when the final output path component is a symlink.

  • backward-compatible: follow the symlink without a warning.

This setting only applies to the final path component. Symlinks in parent directories are not rejected by this parameter.

Action usage

action(type="omfile" file="/var/log/app.log" followSymlinks="off")

Module usage

module(load="builtin:omfile" followSymlinks="off")

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–2026 Rainer Gerhards and others. Licensed under the Apache License 2.0.

Previous Next