<div dir="ltr"><div dir="ltr">On Sun, Nov 20, 2022 at 6:10 AM Ronald Barnes <<a href="mailto:ron@ronaldbarnes.ca">ron@ronaldbarnes.ca</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><br>
I've got a script in /root/backups which is owned by root and chmod 0700.<br>
<br>
Every time the seconds roll over to a new minute, all executable flags <br>
get reset.<br>
<br>
I even tried setting it to the ridiculous chmod of 0711 and all the <br>
executable bits are reset every minute.<br></blockquote><div><br></div><div>I also have a directory /root/bin/ with lots of scripts in them. They are set</div><div>to 755, and they remain that way. <br></div><div><br></div><div>This is Ubuntu Server 20.04 LTS by the way. <br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
What the heck could be causing this?<br></blockquote><div><br></div>My first suspect would be systemd. Check the logs to see if there is something there. <br></div><div class="gmail_quote"><br></div><div class="gmail_quote">I say that because systemd often works against your back to do the opposite of what <br></div><div class="gmail_quote">you want. Case in point: /etc/fstab had device /dev/foo mounting to a directory called <br></div><div class="gmail_quote">/foo. That device was not plugged in when the server was booted. Then I manually <br></div><div class="gmail_quote">mounted /dev/bar to /foo. The command exits successfully and does what you wanted. <br></div><div class="gmail_quote">But systemd thinks it is smarter than the sysadmin, and unmounts it behind your back <br></div><div class="gmail_quote">with no user feedback at all.</div><div class="gmail_quote"><br></div></div>