Page 1 of 1

ubuntu user

Posted: Thu Apr 14, 2011 10:16 am
by cucucur
hi! I need to know the active ubuntu user when I run my php code.

I'm using php-java bridge, and I'm trying to create a java log with php, it doesn't work, and I'm quite sure it's permission problem, so, I want to know "who I am" when I connect.

Is there some command???

Thank you so much!!

Re: ubuntu user

Posted: Thu Apr 14, 2011 10:56 am
by Weirdan

Code: Select all

echo `whoami`;

Re: ubuntu user

Posted: Thu Apr 14, 2011 11:10 am
by Jonah Bron
Yes, Weirdan means that literally. Refer to the manual here:

http://php.net/operators.execution

Re: ubuntu user

Posted: Fri Apr 15, 2011 3:17 am
by cucucur
Thank you so much!!!!