Page 1 of 2

Admin Permission Denied!

Posted: Sun Mar 27, 2016 2:42 pm
by akram84
Greetings
I just upgraded from OpenCart 2.0.2.0 to OpenCart 2.2.2.0
And I get the message : Permission Denied! You do not have permission to access this page, please refer to your system administrator.

I did tried to modify the permission via PhPMyAdmin and still I cannot view anything in except the Dashboard
I cannot view the module or the user group
I cannot do anything in my own website

Please advise

Regards,

Re: Admin Permission Denied!

Posted: Fri Apr 29, 2016 5:04 am
by CharlesPoole
I am having the exact same problem. I have tried resetting the Top Admin Permissions via this https://www.willows-consulting.com/Open ... ncart.html and still can't resolve the problem. We even tried changing all of the folder permission levels and no luck there either.

Thanks for any helpful replies,

Charles

Re: Admin Permission Denied!

Posted: Fri Apr 29, 2016 4:20 pm
by villagedefrance
You want to check the "user" table in your DB.
Compare it with your previous installation (if you have a backup).
If the table is empty or some data has changed, try re-inserting it with the correct values by running a similar query to the one below, in your PhpMyAdmin Query window.

Code: Select all

INSERT INTO `oc_user` (`user_id`, `user_group_id`, `username`, `password`, `salt`, `firstname`, `lastname`, `email`, `image`, `code`, `ip`, `status`, `date_added`) VALUES
(1, 1, 'admin', '8e4f839c67937bf029203ab8976b1f605862981f', 'xQjimkNK0', 'John', 'Doe', 'contact@villagedefrance.net', '', '', '::1', 1, '2016-03-07 15:14:57');
If that fails, well ... the only option then is likely to be a clean install :(

Good luck!

Re: Admin Permission Denied!

Posted: Fri Sep 02, 2016 12:38 am
by cboxgo
You don't need to change anything in your database to fix this issue, in fact the permissions will be changed back as soon as you update permissions under User Groups. Instead, what you need to do is use the correct redirection in your controller.

Here is an example from an older version controller:

Code: Select all

            $this->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
It should now be written as:

Code: Select all

            $this->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));

Re: Admin Permission Denied!

Posted: Sun Sep 04, 2016 4:06 pm
by pm-netti
akram84 wrote:Greetings
I just upgraded from OpenCart 2.0.2.0 to OpenCart 2.2.2.0
And I get the message : Permission Denied! You do not have permission to access this page, please refer to your system administrator.

I did tried to modify the permission via PhPMyAdmin and still I cannot view anything in except the Dashboard
I cannot view the module or the user group
I cannot do anything in my own website

Please advise

Regards,
This is your database data format error? User group data must be to json format.
Are you do upgrade here:
http://forum.opencart.com/viewtopic.php ... 98#p610301
Ps. Your must update file admin/index.php to version 2.2.0.0

Re: Admin Permission Denied!

Posted: Wed Sep 21, 2016 8:34 pm
by klyn05
pm-netti wrote: This is your database data format error? User group data must be to json format.
Are you do upgrade here:
http://forum.opencart.com/viewtopic.php ... 98#p610301
Ps. Your must update file admin/index.php to version 2.2.0.0
I'm having the same error, I've had a *couple* of mods work, but a lot of them are giving me this Permission Denied error. :-\

Very Very frustrating. My admin/index.php states Version 2.2.0.0.
Viewed forum post about Upgrade package. Doesn't mention anything about that specific error... I don't want to go through all those steps if unnecessary.
Any definite fixes anyone has come across? This is awful. ???

Ps. Couldn't find this code in my controller files:
cboxgo wrote:You don't need to change anything in your database to fix this issue, in fact the permissions will be changed back as soon as you update permissions under User Groups. Instead, what you need to do is use the correct redirection in your controller.

Here is an example from an older version controller:

Code: Select all

 $this->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
It should now be written as:

Code: Select all

 $this->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));

Re: Admin Permission Denied!

Posted: Wed Sep 28, 2016 3:54 am
by Rainforest
Did you ever resolve this?
I'm having this issue after upgrading to 2.3.0.2

Re: Admin Permission Denied!

Posted: Sat Oct 01, 2016 12:13 am
by dharam81
I am also getting :
You do not have permission to access this page, please refer to your system administrator while i have installed a payment gateway called EBS and when try to enable this :

Permission Denied! Home Permission Denied!
Permission Denied!
You do not have permission to access this page, please refer to your system administrator.

i am Top administrator and user group permission set all.

Version : 2.3.0.2

Re: Admin Permission Denied!

Posted: Sun Oct 02, 2016 12:34 am
by jsmoove
Did anyone resolve this? I have the same issue. All permissions are are selected, but it still gives me permission denied.

Re: Admin Permission Denied!

Posted: Sun Oct 02, 2016 10:17 pm
by dharam81
not resolved for me but looks like this is coming only for the extension which seems not correctly updated for latest version so these are installed with out error but when it comes to activate it through permission error may be because its using old hierarchy?

Re: Admin Permission Denied!

Posted: Wed Oct 12, 2016 6:36 pm
by siteper
I have the same problem.
when I try to install a module and then to modify it, it gives me Permission Denied.
I think is a bug of opencart.
I tried everything still now also with clean reinstall but problem is not solving.
2 days I'm trying to google some solution but without good result.
Please anyone can help us.
thank you

Re: Admin Permission Denied!

Posted: Thu Nov 17, 2016 4:44 am
by farukaydin21
Same problem here.

I updated from 2.2.0.0 to 2.3.0.2. Then I could change permission only in database. I couldn't find any solution so I went back to good old 2.2.0.0. Now I can only change permission in the database plus whenever I do something in admin it restores to permission denied version. I am going crazy.

Re: Admin Permission Denied!

Posted: Tue Nov 22, 2016 7:02 pm
by Rainforest
farukaydin21 wrote:Same problem here.

I updated from 2.2.0.0 to 2.3.0.2. Then I could change permission only in database. I couldn't find any solution so I went back to good old 2.2.0.0. Now I can only change permission in the database plus whenever I do something in admin it restores to permission denied version. I am going crazy.

I solved my issue. It appears there were old 1.5.6 or old extension files present. I'd advise you take a look at your controller and model folders. Look for old extensions and delete them (back up first). My permission problem is gone. :)

Good luck!

Re: Admin Permission Denied!

Posted: Mon Feb 13, 2017 4:43 pm
by mydemo12
same Problum to me pls help us

Re: Admin Permission Denied!

Posted: Wed Mar 29, 2017 3:19 pm
by roblengyel
I am also having a problem after installing a Isense Labs Module.

I cannot access any of the modules buttion icons without getting a permission denied message.

"You do not have permission to access this page, please refer to your system administrator."

THIS SEEMS LIKE A VERY SERIOUS OPENCART PROBLEM.

Going into the database structure to fix this is not acceptable.

Is there a common problem with the latest version of OpenCart that stuffs up users permissions when you install extensions???

if so it needs to be fixed ASAP.

Re: Admin Permission Denied!

Posted: Fri Mar 31, 2017 5:18 am
by Rainforest
I hear ya. To be honest, I had many issues with isense products and unfortunaly had to request a refund. I think you might want to first uninstall, then manually delete any leftover module files. Then you can reset your admin in phpmyadmin.
It's a lot of work but that's the only fix.
I'd also create a test server before installing any serious modules (like anything from iSense is bound to have issues at first). That way you can mess up the test server all you want :laugh:

Re: Admin Permission Denied!

Posted: Mon Apr 10, 2017 11:57 pm
by mennax
This works for me:
in admin/controller/extension/module/popular.php

Code: Select all

if (!isset($this->request->get['module_id'])) {
    $data['action'] = $this->url->link('module/popular', 'token=' . $this->session->data['token'], 'SSL');
    } else {
    $data['action'] = $this->url->link('module/popular', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL');
}
become:

Code: Select all

		
if (!isset($this->request->get['module_id'])) {
    $data['action'] = $this->url->link('extension/module/popular', 'token=' . $this->session->data['token'], 'SSL');
    } else {
    $data['action'] = $this->url->link('extension/module/popular', 'token=' . $this->session->data['token'] . '&module_id=' . $this->request->get['module_id'], 'SSL');
}

Re: Admin Permission Denied!

Posted: Tue May 09, 2017 11:07 pm
by karlopencart
cboxgo wrote:
Fri Sep 02, 2016 12:38 am
You don't need to change anything in your database to fix this issue

Here is an example from an older version controller:

Code: Select all

            $this->redirect($this->url->link('extension/module', 'token=' . $this->session->data['token'], 'SSL'));
It should now be written as:

Code: Select all

            $this->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));
So if you have an old module check your controller i.e. admin/controller/module/yourmodule.php
then find 'extension/module'
replace 'extension/extension'

Re: Admin Permission Denied!

Posted: Thu Jun 01, 2017 4:55 am
by twistedpixels
If you have come up against the PHP limit and have access to your database then please find attached the full permissions set which you can paste directly into the user group field

Re: Admin Permission Denied!

Posted: Thu Jul 06, 2017 1:17 am
by kilmasz
You should go: settings > user groups , and than check all and save it.. It will kind of refresh your rights. Good luck!