Originally Posted by blancs
(...) php (...) execute (...) shell script (...) another user (...) www user ssh in locally as the other user (...)
I wonder if whatever you're doing is necessary or even safe. I mean, I don't see why the www-user actually needs even more permissions than it already has. And why would the process need a TTY anyway? Maybe instead elaborate on what you are actually trying to accomplish?