Set permissions at end when upgrading