[ILUG] PHP, MySQL and Users...
ajh-lists-ilug at devfoo.net
Fri Sep 22 23:39:14 IST 2000
* David Oggs (dogs at wind.voyager.ie) [000922 23:28]:
> I'm helping set up a college box, and we were hoping to give users the
> ability to run (safe mode) php scripts and give them mysql accounts. The
> problem I'm having is how to keep mysql authentication details secure.
Options include not allowing people to directly access their webspace
using the shell, only through ftp. Then you can run the ftp server as
one user using another file for password's, include this user in the
group that the webserver runs as (not nobody!) and make all the files
> Even if a script can only be read from the filesystem by the owner of the
> file and the group that php runs as it doesn't prevent another user
> from open()'ing it from another script.
Not sure about fopen(), but you can stop include() from including other
files by setting the open_basedir() to the current directory.
> I think what I'm after is some
> way of making a suid php script,
Compile PHP as a cgi binary instead of a module, and use suexec.
More information about the ILUG