Hello and thanks for replies.
the su method seemed to fail
Code:
su - wwwuser -c touch /hsphere/local/home/wwwuser/test.txt
The parent process is not sshd. Exiting...
This maybe related to an sshd issue i have though.
but sudo method worked for touch
Code:
sudo -u wwwuser touch /hsphere/local/home/wwwuser/test.txt
Did not work for script app.sh but think that maybe another issue i looking into.
cheers