In PHP if I run
get_curret_user() it prints
www-data. This makes it impossible for me to use this function in order to test a FTP password from input.
Is there any way to make PHP run under the server admin user?
I changed APACHE_RUN_USER and APACHE_RUN_GROUP in /etc/apache2/envvars to my user name and "users" group, then restarted the server and it worked! But after that I made some changes to the hosts file, restarted apache, and now it runs again under www-data regardless of what's inside the envvars file!