PHP-CLI + File Permissions
-
23-08-2019 - |
Question
When you run a php script in the command line, does is execute with the read/write permissions of the current user or what?
Solution
Yes, it does.
OTHER TIPS
Yes, it runs with the permissions of the current user. Just like executing any other command-line program.
Yes, it will run as the current user in a default setup.
If you where on a unix system you could change this by adjusting the setuid bit of the php cli binary. Of course doing so would be a bad idea.
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow