Welcome Guest, Not a member yet? Register   Sign In
What user under which CodeIgniter runs on Linux?
#1

[eluser]kaege[/eluser]
Hello Smile
I've been developing a web app on Linux platform and I stumbled upon a problem recently: I can't make new file via PHP.
After doing some searching, i found out that the problem has something to do with the "user permission" thing in Linux. I thought it would be the username I always used to login to the system, but I was wrong. I can't write to directory whom I even own. So far, the solution is to permit __OTHER__ users to write to the directory, but I know that it's not a good one.
How do I solve this problem? Is there a way to tell the system to permit PHP writes a file? And what user under which CodeIgniter/PHP runs actually?
#2

[eluser]WanWizard[/eluser]
PHP has the permissions of the user that runs the webserver.

Depending on the distro used, that could be "httpd", "apache", "wwwdata" or even "nobody". So either give this user rights (for example through a group you're both a member of), or give the directory world write rights (less secure).




Theme © iAndrew 2016 - Forum software by © MyBB