• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

The Geek Diary

CONCEPTS | BASICS | HOWTO

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • Linux Services
    • VCS
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
    • Data Guard
  • DevOps
    • Docker
    • Shell Scripting
  • Interview Questions
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to run rsyslog as a non-root user in CentOS/RHEL 7

By admin

You can utilize the $PrivDropToUser, $PrivDropToUserID, $PrivDropToGroup, and $PrivDropToGroupID configuration directives to run rsyslog as a non-root user. When these variables are used, rsyslog will start as root, but will drop to the specified user and/or group after initialization. The daemon will then run in accordance with the permissions of the specified user or group.

Note: If SELinux is in ‘enforcing’ mode on your system, additional troubleshooting may be necessary to ensure the below steps work as expected.

1. rsyslog runs as root by default in CentOS/RHEL 7, and permissions issues will be present when running it as a non-root user.

2. To ensure that you can get logging from systemd’s journal in /run/logs/journal, modify the specified user to become a member of the ‘systemd-journald‘ group:

# usermod -G systemd-journal [specified_user]

3. Additionally, you will need to make sure that the non-root user has write access to the following logs, as well as the directories they are included within (/var/lib, /var/log):

/var/lib/rsyslog
/var/log/messages
/var/log/secure
/var/log/maillog
/var/log/cron
/var/log/spooler
/var/log/boot.log

Filed Under: CentOS/RHEL 7, Linux

Some more articles you might also be interested in …

  1. How To Migrate Existing Iptables rules to Nftables In CentOS/RHEL 8
  2. DNS configuration file /etc/named.conf explained
  3. How to Rebuild GRUB on MSDOS Partition Type in CentOS/RHEL/OEL 7
  4. CentOS/RHEL: How to find the package with a missing file using YUM
  5. CentOS / RHEL 7 : How to configure kdump using GUI
  6. Command ntpstat Shows unsynchronised (CentOS/RHEL)
  7. How to Configure Remote Rsyslog To Accept TLS and Non-TLS in CentOS/RHEL
  8. How to grow/extend XFS filesytem in CentOS / RHEL using “xfs_growfs” command
  9. 5 Useful Examples of firewall-cmd command
  10. Basic “ls” Command examples in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • Oracle Database – Configuring Secure Application Roles
  • Extend rule sets by using factors in Oracle Database Vault
  • What are Command Rules in oracle Database
  • Using Rule Sets in Oracle Database Vault
  • Archives
  • Contact Us
  • Copyright

© 2021 · The Geek Diary