I recommedn that you check the current owner with:
ls -la /usr/share/squirrelmail
and then choose the same user and group for the chmod.
But I would not overwrite the debain squirrelmail files if you like to use a newer version of squirrelmail. The debian files use a sepceial configuration with config files in other locations to match debians package guidelines, so it might be that squirrelmail breaks if you verwrite it with files from the standard squirrelmail tar.gz file. It might be better to create a new folder like /usr/share/squirrelmail2 and put your new installation there. Then change the webmail symlink in /var/www/ to point to this new directory.