Fix permissions on update