[kwlug-disc] Script gets executable flag unset every minute - why?
Giles Malet
gdmalet at gmail.com
Sun Nov 20 12:00:42 EST 2022
On 2022-11-20 06:09, Ronald Barnes wrote:
> I've got a script in /root/backups which is owned by root and chmod 0700.
> Every time the seconds roll over to a new minute, all executable flags
> get reset.
You can prevent this from happening by setting the file to immutable:
# chattr +i /root/backups
You can do -i later once you sort things out.
> What the heck could be causing this?
Not sure how useful this is in this case, but Linux has an inotify(7)
syscall that can tell you *when* something changes a file (but you
already know). A quick search found the inotify-tools package, which
allows this to be used from shell scripts. It won't tell you *what* is
making the change though.
I realise I didn't actually address your original question, sorry.
g
More information about the kwlug-disc
mailing list