You are here: Foswiki>Tasks Web>Item9646 (31 Dec 2010, GeorgeClark)Edit Attach

Item9646: bin/statistics requires admingroup to be added to AdminGroup

pencil
Priority: Urgent
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Engine
Component: statistics script
Branches:
Reported By: KiltBear
Waiting For: Main.KiltBear
Last Change By: GeorgeClark
FINALLY made the full fledged hop from TWiki to FOSwiki 1.0.9. wink Glad to finally be onboard. Things have gone smoothly, except I am noticing an oddity when running the bin/statistics script.

  • When I run the bin/statistics script, the id that shows up as the most recent editor on the WebStatistics pages is admingroup. All lowercase, no links.
  • For each protected Web, I found that I was getting an error: - ERROR: no permission to CHANGE statistics topic in System.
  • I had to add the user admingroup into the userlist for the Main.AdminGroup and then the script completed on all my protected webs. (The protected webs of course allow Main.AdminGroup to view and edit.

-- KiltBear - 08 Sep 2010

Something is wrong here with the script. It should be running under a user permission and not as a group. As a workaround you could pass the parameter -user AdminUser to the statistics script.

-- GeorgeClark - 15 Sep 2010

Elevating to urgent. This sort of thing should just work. Let is get it fixed in 1.1.0

-- KennethLavrsen - 15 Sep 2010

Note also Item9675 - On trunk, the workaround doesn't work. Trunk always runs from CLI as WikiGuest, and the -user parameter is not honored.

-- GeorgeClark - 16 Sep 2010

The checkin - distro:605fa12f7ddc solves the wrong user issue. I have only committed to trunk for now until some more eyes check it out.

-- GeorgeClark - 16 Sep 2010

Well... now I have to add "adminuser" to AdminGroup to get the statistics script not to have error permissions. This is happening on 1.1.2.

-- KiltBear - 07 Dec 2010

I think you should use admin not adminuser - unless you've renamed your admin user in configure.

also, note that George did actually merge into 1x1 branch 3 months ago - so I presume it is fixed and released?

-- SvenDowideit - 13 Dec 2010

Sven, this was an install of 1.1.2. I put adminuser because on the webs on which it is successful (which is all of them now) adminuser is shown as the modifier of the topic page.

-- KiltBear - 13 Dec 2010

  • What do you use on the command used to run the statistics process?
  • Have you changed the settings of $Foswiki::cfg{AdminUserLogin}, $Foswiki::cfg{AdminUserWikiName} or $Foswiki::cfg{SuperAdminGroup}?
  • What mapper do you use?

This task is closed and "released" so we cannot reopen it to record any additional work. That would break the release / task tracking process. If you still have problems, please open a new task and document exactly what you do to encounter this issue.

Note that you can verify this using the view script and a topic containing:
<noautolink>
CURRENT USER %USERINFO{ format="$username is really $wikiname" }%
</noautolink>

This is what I get on my test system. Works the same on trunk and a 1.1.2 install.

$ ./view /Sandbox.TestTopic1 | grep CURR
CURRENT USER admin is really AdminUser

$ ./view -user admin /Sandbox.TestTopic1 | grep CURR
CURRENT USER admin is really AdminUser

$ ./view -user AdminUser /Sandbox.TestTopic1 | grep CURR
CURRENT USER admin is really AdminUser

$ ./view -user adminuser /Sandbox.TestTopic2 | grep CURR
CURRENT USER adminuser is really adminuser

$ ./view -user WikiGuest /Sandbox.TestTopic1 | grep CURR
CURRENT USER guest is really WikiGuest

This hopefully shows that the default user for CLI scripts is the admin user, and the "-user" parameter does override the user regardless of using login name or WikiName in the field. However it is case sensitive. So "adminuser" is not the same as "AdminUser". The statistics script runs under the same user controls.

-- GeorgeClark - 19 Dec 2010

 

ItemTemplate edit

Summary bin/statistics requires admingroup to be added to AdminGroup
ReportedBy KiltBear
Codebase 1.0.9
SVN Range
AppliesTo Engine
Component statistics script
Priority Urgent
CurrentState Closed
WaitingFor KiltBear
Checkins distro:605fa12f7ddc distro:f941da0b31a9
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r13 - 31 Dec 2010, GeorgeClark
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy