fix torch permissions