Fix permissions for devices