Updated permissions script