[kwlug-disc] Script gets executable flag unset every minute - why? [SOLVED]

Ronald Barnes ron at ronaldbarnes.ca
Sun Nov 20 16:53:24 EST 2022


Khalid Baheyeldin wrote on 2022-11-20 07:27:

> My first suspect would be systemd. Check the logs to see if there is
>  something there.

That was my thought - I'd been setting up a .timer and .service to
invoke the shell script, but they failed because the script wasn't
executable.



> But systemd thinks it is smarter than the sysadmin, and unmounts it 
> behind your back with no user feedback at all.

In this case, systemd was definitely smarter than the sysadmin.

Upon closer inspection of the crontab, I noticed something I'd overlooked.

The folder is where a lot of backups reside, and I wanted them to be 
root owned and chmod 0600 for extra safety.

This was set to happen every minute.

Must have been something I setup during testing and forgot to change?

Or was just being dumb, should have run chmod g-rw,o-rw instead. And, 
added that to the end of the backup script(s).



Foot-gun holstered...

rb




More information about the kwlug-disc mailing list