* David Oggs (dogs at wind.voyager.ie) [000922 23:28]:
> Hi,
>> 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
640.
> 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.
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!