# How to Convert Deprecated $DirOwner to Modern Style

Warning

The `$DirOwner` syntax is deprecated. We strongly recommend using the modern omfile module syntax for all new configurations.

## Modern Equivalent: dirOwner

The modern equivalent for the global $DirOwner directive is the dirOwner parameter, which is set within an action() object using the omfile module. It serves the same purpose of setting the user for newly created directories.

For full details, please see the omfile module reference page.

## Quick Conversion Example

This example shows how a legacy configuration is converted to the modern style.

Before (Legacy Syntax):

    $DirOwner loguser
    *.* /var/log/some-app/logfile.log

After (Modern `action()` Syntax):

    action(type="omfile"
           file="/var/log/some-app/logfile.log"
           dirOwner="loguser"
          )

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.