Forum OpenACS Q&A: Revoked permissions for Main Site

Request notifications

Posted by Steve Manning on
Eeek - I've been playing with permissions on my development machine and in my haste I've inadvertently revoked the public read rights to the main site. Needless to say now all I get is  an 'unable to load requested page' message if I try to look at anything.

Is there a quick way to get it back or is it quicker to reinstall?



PS Could someone please say 'ha weve all done that in our time!' ;-)

Posted by Jeff Davis on
You will have to fix it directly in the db The function is
select acs_permission__grant_permission(:object_id, :party_id, :privilege);
party_id in this case is -1, priv is read, and you can get the object_id for main site via
select object_id from  site_nodes where parent_id is null;
(it's 2565 on the installs I have done lately).
Posted by Steve Manning on
Thanks very much for that Jeff it worked a treat (object_id was 2505 for me).

I had just found the acs_permission function call in the Developers Guide and was wondering how to get the parameters when your message arrived. Nice timing.

As a newbie I find the hardest part is finding my way around the db and how the whole thing hangs together. The docs are good but I find they make some assumptions when it comes to the db (or I'm just being thick - or I'm reading the wrong docs?).

Onward and upwards.


Posted by Eric Wolfram on
okay, I'm officially in the "revoked public read permissions from my root" club.

I logged into my database by going to the command line and typing:

psql my_database

The sql that I used (thanks to the docs above)

select acs_permission__grant_permission(2087, -1, 'read');

notice the lack of : and the single quote around read...


Posted by Jade Rubick on
I think all of us have done this before. I certainly have.

Here is my bug posting for this issue:

Posted by Roberto Mello on
I have fixed this in CVS (oacs-4-6. Will try to merge to HEAD now).


Posted by Ben Koot on
I had the same problem, but for some reason, when I opened up our main site in Opera browser, instead of IE where I was banned from access, even beeing admin, I had no problem getting access. I do feel we need to add a warning, or even disable the functionality because most people will simply start playing instead of reading manuals ( if available on the subject) this is a realy nasty surprise that cost me hours to overrule.

P.s it would be valuable to have a readble explantion of the beast anyway ( I mean the permission system ) So if there is anybody out there that understands both the groups, and the permissions system ( as they create the greatest confusion), please try to create a document that translates technotalk into plain English, and use some real life examples to give less geekminded people someting to chew on. Right now these 2 parts of OpenACS are a bit like 'Russian Roulette". You never know what will happen. I have no problem playing around and spending hours learning the system, but if changing 1 sylable in the sytem means I no longer have access, we do have a problem. Even having a short guide on how to unlock woudl help many first time users, and help make feel peopel at ease using OpneACS, as I gather that's what why the system is build in the first place.