I have resolved this issue.
don't use su user, use su - user
su user:
Switches to the user without starting a login shell. Inherits the current user's environment.
su - user:
Switches to the user and starts a login shell. It loads the full environment of the user, including .bash_profile.