Created
February 10, 2020 13:16
-
-
Save thiagomgo/482ec939131bb78900a8eee43f467fa8 to your computer and use it in GitHub Desktop.
Check which user is running under web server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<? | |
echo "I am running as user="; | |
system("whoami"); | |
echo "<P>I can write here= "; | |
system("pwd"); | |
$fname="write_test.txt"; | |
if (file_exists($fname)) { | |
echo "<P> I found file $fname and will delete it"; | |
unlink($fname); | |
echo "...Done"; | |
} | |
echo "<P>I'm writing new file $fname"; | |
system ("touch $fname"); | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment