Fix some permissions settings on JS