Changed which chmod we use as we're not really using any Sun specific functionality