how to increase user's permissions while creating files/directories under same user (and not root)?

view full story

http://serverfault.com – Is there a command that allows a user to temporarily have root permissions but files and directories created by the user still reflects the user rather than root? For example, I have a user that needs to install some software (Glassfish), but the self-extracting installer returns an error "permission denied". Is there a way to give the user higher permissions to run the installer such that when the installer creates directories and files they are owned by the user doing the installation (rather than root)? Is this even possible? (HowTos)