Skip to content


checkUserIsSuperUser aborting #1699

anonymous-piwik-user opened this Issue · 11 comments

3 participants


Initial Ticket was closed without chance to correct initial report.

The last two errors from the referenced bug report were just other examples of issues that were showing up. I know we can change the script and the user which is needed to work. However even after bash is installed and the script is run as root using bash there is still the initial error from the previous bug report when running the script.

Using /usr/local/bin/bash misc/cron/
Starting Piwik reports archiving...
Reports archiving finished. Starting Scheduled tasks...
Error: You can't access this resource as it requires a 'superuser' access.Finished Scheduled tasks.""

It is not running any reports at all. There are about 12 websites in there. Its just throwing errors about access. Is there a cause for this that I am missing?


Sorry, looks like I jumped the gun.

I can't reproduce the initial error. In core/Access.php's checkUserIsSuperUser(), can you replace the method with this ... maybe it'll tell us where the privilege check is occurring.

        public function checkUserIsSuperUser()
                        throw new Piwik_Access_NoAccessException(Piwik_TranslateException('General_ExceptionPrivilege', array("'superuser'")));

I changed the code to match and here is the output.
Using sh it is throwing this message:

sh misc/cron/
Starting Piwik reports archiving...

Reports archiving finished.
Starting Scheduled tasks...

#0 Piwik_Access->checkUserIsSuperUser() called at [/usr/local/www/piwik/core/Piwik.php:1233]
#1 Piwik::checkUserIsSuperUser() called at [/usr/local/www/piwik/plugins/CoreAdminHome/API.php:36]
#2 Piwik_CoreAdminHome_API->runScheduledTasks()
#3 call_user_func_array(Array ([=> Piwik_CoreAdminHome_API Object (),1 => runScheduledTasks), Array ()) called at [/usr/local/www/piwik/core/API/Proxy.php:151]
#4 Piwik_API_Proxy->call(Piwik_CoreAdminHome_API, runScheduledTasks, Array ([=> 7a9205a66ed1cb755f1b52356ebdc352,-- => ,[=> API,method => CoreAdminHome.runScheduledTasks,[=> csv,convertToUnicode => 0,[=> 50)) called at /usr/local/www/piwik/core/API/Request.php:117
#5 Piwik_API_Request->process() called at [/usr/local/www/piwik/plugins/API/Controller.php:27]
#6 Piwik_API_Controller->index()
#7 call_user_func_array(Array ([=> Piwik_API_Controller Object ( => API,[=> , => ,[=> 0, => ),[=> index), Array ()) called at /usr/local/www/piwik/core/FrontController.php:126
#8 Piwik_FrontController->dispatch() called at [/usr/local/www/piwik/index.php:60]
Error: You can't access this resource as it requires a 'superuser' access.Finished Scheduled tasks.

If I use bash -e then it shows this:

bash -e misc/cron/
Starting Piwik reports archiving...

Nothing is updated in either case. Very odd. I apologize for the hassle, but this is driving me crazy. :)

Would it be better to attach the output in a separate file?


Attachment: Piwik output on run
piwik output.txt


I'm not sure why this is, but the token auth as showing in the above output (7a9205a66ed1cb755f1b52356ebdc352) does not match the token assigned to any user in the system. That exact string does not exist in the database at all.


Well, at the risk of sounding like a idiot I think I figured out the problem. This install is from .04 or 5 that has been continuously upgraded. I noticed on a clean install that it does not allow for spaces in the administrator user name.

I edited the config.ini.php to remove the space from my admin login name on my old install and the script now works as expected.

I can't imagine nobody else has run into this. I must have missed the memo.

Thank you for your help

Piwik Open Source Analytics member

Someone ran into this issue before which is we now forbid spaces in passord. However we didn't deal with existing SU passords containing spaces (as you were probably only 2 users affected by this..)


In my case it was a space in the user name not the password. In any case, I'm confirming it fixed by removing the space from my user name.


(In [3154]) fixes #1699 - add an update warning if superuser login is no longer a valid format

Piwik Open Source Analytics member

vipsoft, I thought the issue was also with the SU password containing spaces? The patch deals with username only. thanks:)


matt: even if so, there's no way to determine that since we only save a hash

Piwik Open Source Analytics member

indeed, thanks for following up

@anonymous-piwik-user anonymous-piwik-user added this to the Piwik 1.1 milestone
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.