For the longest time I've gotten the following error from Snort's barnyard2
spooler process:
barnyard2: Could not remove pid file /var/run//barnyard2_NULL.pid: Permission denied
On Ubuntu 16.04, the barnyard2
process is created in this systemd unit file:
/lib/systemd/system/barnyard2.service
This process creates the pid file in the /var/run
directory before the user permissions drop to the level provided by the '-u' option. Then when exiting, the process attempts to delete the pid file that was created with elevated privileges.
To fix this, I modified the process's systemd file: