fix permissions script