DOOH!!!
That script is causing the problem.
PMS 1.31.x and above is sensitive to permission changes as well.
You need to change your scripting to be: