Skip to main content
1 of 2
Bill
  • 51
  • 4

You are using selinux. If you "setenforce 0" and then let cron run, you will get the output you expect. At the root shell, your selinux context is:

unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

But when running from Cron, your selinux context starts as:

system_u:system_r:system_cronjob_t:s0-s0:c0.c1023

| to another command works, so you could have also done "| cat > file"

aide then does its own thing with selinux which causes redirection to fail.

Bill
  • 51
  • 4