views:

241

answers:

3

When you run a php script in the command line, does is execute with the read/write permissions of the current user or what?

+4  A: 

Yes, it does.

hop
stupid SO wouldn't allow me "yes." as an answer ;)
hop
+2  A: 

Yes, it runs with the permissions of the current user. Just like executing any other command-line program.

Rob Kennedy
A: 

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.

Zoredache