use fchmod rather than chmod to restore device permissions