permissions: fixed previous commit which used invalid variable

- reported by Kelvin Chua