[plug] Web Application Installer

Onno Benschop onno at itmaze.com.au
Fri Jan 28 11:37:41 WST 2005


Hi all,

If you're short on time, please file this and have a look later, because
it is a little involved and I hate to waste your time if you're
attempting to head out the door.

If you are still here, grab a cuppa and stick around, I've got a curly
question and I've spent some time trying to figure out how I might solve
it.

The challenge involves the installation of a web-application which
traditionally includes a whole host of instructions that start with the
line: "un(zip/tar) this file, then copy the local directory to your
web-server" Generally it goes on to talk about permissions etc.

I'm trying to solve the problem in a different manner, inspired by the
Sun-Java installer I came across when making the ATO site work under
Linux (BTW, I've lodged my first BAS and it worked just fine :-)

The Sun-Java installer presents itself as a script, but is in fact a
self-extracting shell based installer. It basically has the actual
application archive tacked on the end of a script which knows how to
extract it.

I've written the same under PHP. It uses no external libraries, packs
all the directory structure and the individual files and sticks them on
the end of a php script. I've written a builder script that generates
such an archive.

The idea is that you can copy the file to your web-server, open your
browser and run the installer across the network to your hosting company
without the need for shell access to make it work, nor do you need to
recursively upload a whole directory structure from your local
hard-drive.

If you're still here, now we come to the challenge.

A PHP script runs as either the owner of the web-directory or the owner
of the web-server process, depending on the way the hosting company has
installed their environment.

Generally the latter implementation is more common.

So, the PHP script/installer is running as the web-server user, trying
to create an application structure inside a different user's directory.

I can change the ownership of the script to that of the web-server,
though it would involve teaching the user how to use chmod across
ftp/sftp, because AFAIK scp won't do that and telnet/ssh access is not
always available.

Ditto for the directory in which the application is installed.

I feel that in this day and age we should be able to find a way to
assist a new-comer to web-applications in their plight, but what do you
think?

Am I fundamentally trying to make something work that should never work,
or am I missing something else obvious?


Fingers crossed,

Onno Benschop 

Connected via Optus B3 at S34°32'27" - E146°24'35" (Leeton, NSW)
-- 
()/)/)()        ..ASCII for Onno.. 
|>>?            ..EBCDIC for Onno.. 
--- -. -. ---   ..Morse for Onno.. 

Proudly supported by Skipper Trucks, Highway1, Concept AV, Sony Central, Dalcon
ITmaze - ABN: 56 178 057 063 - ph: 04 1219 8888 - onno at itmaze dot com dot au




More information about the plug mailing list