Script in /etc/cron.daily not executed

Creating a bug report/issue

Required Information

  • DietPi version |
    G_LIVE_PATCH_STATUS[0]=‘not applicable’
  • Distro version | bullseye
  • Kernel version | Linux HomeHub 5.10.0-23-amd64 #1 SMP Debian 5.10.179-1 (2023-05-12) x86_64 GNU/Linux
  • Architecture | amd64
  • SBC model | Native PC (x86_64)
  • Power supply used | N/A
  • SD card used | N/A

Additional Information (if applicable)

  • Software title | cron daily scripts
  • Was the software title installed freshly or updated/migrated? freshly
  • Can this issue be replicated on a fresh installation of DietPi?

Steps to reproduce

Placed a script in /etc/cron.daily to perform daily tasks

Expected behaviour

Execution of the script

Actual behaviour

Script not executed

Extra details

By manually executing all scripts in /etc/cron.daily, I boiled it down to ‘/run/dietpi/.dietpi_motd’ being present.
The command ‘[[ -f ‘/run/dietpi/.dietpi_motd’ ]] && rm -f /run/dietpi/.dietpi_motd’ in script ‘/etc/cron.daily/dietpi’ asks for confirmation with ‘y’ to delete the file. My suspicion is that cron.daily execution stops here.
Mitigation would be to add flag ‘-f’ to the rm command.

Can you share your script please, and also ls -la /etc/cron.daily/.
At least when I run rm some_file (without f flag) no confirmation is popping up.

usually there is no confirmation required using rm command as user root

My script is not executed. To clearify, maybe I explain some more details:

Currently, there are five files in /etc/cron.daily


with ‘postgres-backup’ being the only file I manually added, i.e. my script.

Execution of all content with

test -x /usr/sbin/anacron || { cd / && run-parts --report /etc/cron.daily; }

promts for input with the following line:

rm: remove write-protected regular file ‘/run/dietpi/.dietpi_motd’?

Execution of all further commands/scripts stops with this promt.

for me this is working without issue. No promt. Which user you use to execute that test function? Do you use root user?