From: John Cowan <xxxxxx@ccil.org>Date: Thursday, August 08, 2019 12:58 PMOn Thu, Aug 8, 2019 at 1:51 PM Lassi Kortela <xxxxxx@lassi.io> wrote:If our procedure does chmod(path, (mode & PERMBITS)) then it clears anysticky and setuid/setgid bits on each call.You should not, under any circumstances, change the file permissions without knowing what the values of the other three bits should be (typically all zero). I am completely fine, if you call it with #x777 or #x600 or whatever, to clear the other three. So let's just call chmod passing the argument directly (chmod already masks off the file-type bits) and leave it at that.
By the way, I meant to say *don't* change the procedure name. I was brain farting that it was currently set-permission-bits.