Forum OpenACS Q&A: Protect a cgi-bin directory in openacs 4.x
Posted by David Walker on 12/16/02 07:49 AM
Is there an openacs 4.x interface to setting permissions for directories like cgi-bin or those that contain static files?
2: Re: Protect a cgi-bin directory in openacs 4.x (response to 1)
Posted by Titi Ala'ilima on 12/16/02 06:01 PM
One way to do this is register a filter (ad_register_filter) on the appropriate URLs. You can create a small package (which I did once, long ago, but have since lost) which you mount at the URL you wish to set the permissions on (e.g. /cgi-bin), which basically just register the filter in its init script, and then you can set the appropriate permissions from the site-map. Unless you put some effort into it, it will probably require that you restart the aolserver when you mount or unmount an instance so that the filters are up to date.
3: Re: Protect a cgi-bin directory in openacs 4.x (response to 1)
Posted by Bart Teeuwisse on 12/17/02 07:20 PM
there is no need to mount a package at the URL you wish to set permissions on. Just create a node in the site map and assign permissions. Would that be enough for you?
4: Re: Protect a cgi-bin directory in openacs 4.x (response to 1)
Posted by David Walker on 12/17/02 07:29 PM
Well it doesn't show the "Set Permissions" link until I mount the empty package I created for this purpose there. But it is working fine now.
5: Re: Protect a cgi-bin directory in openacs 4.x (response to 4)
Posted by Bart Teeuwisse on 12/17/02 07:38 PM
you are right. I overlooked the fact that in my instance I had the page package mounted. This is in a site build with an older version of OpenACS 4.x which doesn't show the mounted package.
6: Re: Protect a cgi-bin directory in openacs 4.x (response to 5)
Posted by Tilmann Singer on 12/18/02 08:27 AM
It's propably not useful in your situation but I thought I'd mention the gatekeeper package anyway, which will allow you to put any other existing cgi-bin or other web application under OpenACS permission control.