Forum OpenACS Q&A: Protect a cgi-bin directory in openacs 4.x

Is there an openacs 4.x interface to setting permissions for directories like cgi-bin or those that contain static files?
Collapse
Posted by Titi Ala'ilima on
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.
Collapse
Posted by Bart Teeuwisse on
David,

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?

/Bart

Collapse
Posted by David Walker on
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.
Collapse
Posted by Bart Teeuwisse on
David,

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.

/Bart

Collapse
Posted by Tilmann Singer on
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.