I am having trouble in accessing files on the server.
exec(whoami)
returns apache
. However, files that I have to read and write through PHP scripts have a username as ben
like this:
-rw-r--r-- 1 ben staff 1000 Mar 27 17:54 backup_1.sql
-rw-r----- 1 ben staff 2000 Mar 27 17:54 backup_2.sql
Setting write permission to apache on this subdirectory will do the job, but then I am concerned of security.
On my website, I have a login system. Is there a way to change a webserver user to ben
upon logging-in to a specific account in database, say admin
?
Is it even possible to change the webserver username from apache
to something else?