Andrew In a nutshell - create a directory within which you want to put protected content (scripts, static files such as images, html, whatever) - then in the above directory, create a .htaccess file and apply rules that specify who can access the content within the directory - in the .htaccess file you should specify the place where to look for authentication credentials using the AuthUserFile directive - then create username/password credentials for the above directory using 'htpasswd'
This should mean that your cgi script can only be run by specific users, that you define, and who supply the appropriate credentials for the directory that the cgi lives in. Read this for an example of how to create a password protected directory when running Apache on *nix. http://www.colostate.edu/~ric/htpass.html Full details are available in Apache docs. This is a good starting point for you: http://httpd.apache.org/docs/2.2/programs/htpasswd.html Hope this helps and is relevant for you. -Abhinav 2009/9/6 Andrew Errington <[email protected]>: > On Sun, September 6, 2009 15:13, Steve Holdoway wrote: >> Not being familiar with python, I'd use PHP SOAP libraries, but this >> looks like it'll help... >> >> http://www.opensourcetutorials.com/tutorials/Server-Side-Coding/Python/py >> thon-soap-libraries/page1.html > > Thanks. The 'how' is not really relevant- I can learn from your PHP SOAP > example and re-write in Python. I'm mostly interested in the 'what' (i.e. > "what to do" to make it work). > > I have a .htaccess file on the hosted webserver. Can I do something with > that? From what I've read the cgi subsystem is independent of the user > authentication. i.e. the cgi can only be run *if* the user was > authenticated. This means I have to set up authentication on the server > somehow. However, if I authenticate J.Randomuser I need to allow him > access to only that cgi script and not to all the other server stuff that > is being hosted (i.e. my mail and other files). > > I have no idea what I am doing (in case you hadn't figured it out). > Whatever I do I need to understand the techniques so that I can re-apply > them when the form-and-webpage-generator moves to another server. > Undoubtedly it will move somewhere where there is no Python and everything > is in Korean. :( > > Thanks, > > Andrew > > (Obligatory Linux content- the server is running Red Hat) > > -- Abhinav Keswani @wasabhi
