I have an mdadm-RAID and want to get notified about events, for example a failing HDD. I can use MAILADDR
and PROGRAM
in the mdadm config file to achieve this. I decided to use the latter. So I wrote a simple notification bash-script and set the PROGRAM
-option to the script's path.
To avoid that each and every user can use this script to send notifications only the root-user has the execute-right on that script. So when mdadm wants to send a notification it must run the script as root.
However I cannot find any option to set the user. Is it always root by default?