Skip to main content
added 10 characters in body
Source Link
jimmij
  • 48.7k
  • 20
  • 136
  • 141

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

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

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

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

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

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.

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.

Source Link
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.