On Fri, Feb 9, 2024 at 11:11 AM Marc Chamberlin via openSUSE Users <users@lists.opensuse.org> wrote:
I ran into a problem in OpenSuSE 15.5 trying to start the cron.service daemon. It failed because the directory at /etc/cron.d was empty (which in previous releases of OpenSuSE it was not empty). The cron.service file, as supplied from the installation repos, has a couple of ExecStartPre shell commands shown here - (the second ExecStartPre command seems to be redundant, but I don't know that for sure, because I don't know how chmod is suppose to handle recursion and wildchars. Man pages seem unclear about this).
You neither tell what package you installed nor show the actual errors. IIRC Leap is using cronie and its cron.service does not have these commands.
ExecStartPre=+/bin/sh -c '/bin/chmod -R 0744 /etc/cron.*' # Only do the following ExecStartPre if there is something in /etc/cron.d ExecStartPre=+/bin/sh -c '/bin/chmod -R 0644 /etc/cron.d/*'
Even commenting out the second ExecStartPre command doesn't solve the failure I was getting from the first chmod command. Anywise I managed to fix this issue by using the following ExecStartPre commands instead -
ExecStartPre=+/bin/sh -c '/bin/chmod 0744 /etc/cron.*' ExecStartPre=+/bin/sh -c '/bin/chmod -R 0744 /etc/cron.*/*'
So, is the script in cron.service wrong/broken or is chmod itself broken? (or maybe my version of OpenSuSE 15.5 is screwed up somehow? won't be the first thing to have gone wrong with it on my new laptop! sigh)
Marc...