Fix device permissions