简体   繁体   中英

How to run <?php echo exec('whoami'); ?>

After copying and pasting

<?php echo exec('whoami'); ?>

Into a file named index.php and navigating to my ip the only output is www-data .

Is this the Apache process owner?

Is there a way to run this from the terminal for a more finite output?

As the manual said, whoami Print the user name associated with the current effective user ID . In other words, it displays the name of the currently logged-in user. So your server Apache is run under www-data username.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM