Post by globalmahi » Tue Sep 14, 2021 1:24 pm

Hello Forum members,

I am a new user of open cart. I just install opencart 3.0.3.7 in my domain. Its works well. But suddenly when I tried to install a new plugin I lost my admin user permission. As now in my website dashboard there is no left side active navigation menu. When I click it shows me, "You do not have permission to access this page, please refer to your system administrator." Like the attached photo.

Can any one please kindly help me to solve this issue. Once again I am a very new user...

Attachments

Admin Permission denied.png

Admin Permission denied.png (74.23 KiB) Viewed 5743 times

Last edited by globalmahi on Wed Sep 15, 2021 9:52 am, edited 1 time in total.

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by OSWorX » Tue Sep 14, 2021 2:27 pm

globalmahi wrote:
Tue Sep 14, 2021 1:24 pm
But suddenly when I tried to install a new plugin I lost my admin user permission.
And which??

Full Stack Web Developer :: Dedicated OpenCart Development & Support DACH Region
Contact for Custom Work / Fast Support.


User avatar
Guru Member

Posts

Joined
Mon Jan 11, 2010 10:52 pm
Location - Austria

Post by globalmahi » Tue Sep 14, 2021 2:34 pm

OSWorX wrote:
Tue Sep 14, 2021 2:27 pm
globalmahi wrote:
Tue Sep 14, 2021 1:24 pm
But suddenly when I tried to install a new plugin I lost my admin user permission.
And which??
The dashboard didn't show any navigations icons and I have no access of my dashboard as well as can not do anything in admin side.

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by ADD Creative » Tue Sep 14, 2021 4:38 pm

You could try restoring the user_group table from a backup or clean install. You could also try clearing your storage/modification folder to clear any OCMOD changes. Take a backup first in case you make things worse.

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by JNeuhoff » Tue Sep 14, 2021 4:59 pm

Can you still access the System > Users > User Groups > Administrator ? If so, go to there and set the modify and access rights for everything in there.

Export/Import Tool * SpamBot Buster * Unused Images Manager * Instant Option Price Calculator * Number Option * Google Tag Manager * Survey Plus * OpenTwig


User avatar
Guru Member

Posts

Joined
Wed Dec 05, 2007 3:38 am


Post by globalmahi » Tue Sep 14, 2021 5:08 pm

JNeuhoff wrote:
Tue Sep 14, 2021 4:59 pm
Can you still access the System > Users > User Groups > Administrator ? If so, go to there and set the modify and access rights for everything in there.
I can't go in there....

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by xxvirusxx » Tue Sep 14, 2021 5:14 pm

ADD Creative wrote:
Tue Sep 14, 2021 4:38 pm
You could try restoring the user_group table from a backup or clean install.

Upgrade Service | OC 2.3.0.2 PHP 8 | My Custom OC 3.0.3.8 | Buy me a beer


User avatar
Expert Member

Posts

Joined
Tue Jul 17, 2012 10:35 pm
Location - România

Post by globalmahi » Tue Sep 14, 2021 5:16 pm

xxvirusxx wrote:
Tue Sep 14, 2021 5:14 pm
ADD Creative wrote:
Tue Sep 14, 2021 4:38 pm
You could try restoring the user_group table from a backup or clean install.
Thank you for your reply. Can you please explain me in a bit details, how can I do that? I am sorry as explain, I am really a novice user.. Please kindly help me..

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by straightlight » Tue Sep 14, 2021 5:38 pm

globalmahi wrote:
Tue Sep 14, 2021 5:16 pm
xxvirusxx wrote:
Tue Sep 14, 2021 5:14 pm
ADD Creative wrote:
Tue Sep 14, 2021 4:38 pm
You could try restoring the user_group table from a backup or clean install.
Thank you for your reply. Can you please explain me in a bit details, how can I do that? I am sorry as explain, I am really a novice user.. Please kindly help me..
You could either look for an extension on the Marketplace or create a new service request in the Commercial Support section of the forum to get this done as a custom job.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by Gergely » Tue Sep 14, 2021 5:39 pm

  1. Go to phpmyadmin
  2. Locate the 'user' table (it will have a db prefix, so could be something like 'oc_user' or similar)
  3. Find your username in the username field, and take note of the user_group_id in the same row
  4. Locate the user_group table (it will have the same prefix as the user table)
  5. Find the row with the user_group_id you noted down in step 3
  6. Click on edit
  7. Replace whatever is in the permissions field with the following:

    Code: Select all

    {"access":["user\/user","user\/user_permission"],"modify":["user\/user","user\/user_permission"]}
    
  8. Log in to the admin panel
  9. Go to System>Users>User Groups>Name of User Group, and give yourself all the other required permissions

Active Member

Posts

Joined
Wed Sep 30, 2020 7:58 pm

Post by straightlight » Tue Sep 14, 2021 5:46 pm

Gergely wrote:
Tue Sep 14, 2021 5:39 pm
  1. Go to phpmyadmin
  2. Locate the 'user' table (it will have a db prefix, so could be something like 'oc_user' or similar)
  3. Find your username in the username field, and take note of the user_group_id in the same row
  4. Locate the user_group table (it will have the same prefix as the user table)
  5. Find the row with the user_group_id you noted down in step 3
  6. Click on edit
  7. Replace whatever is in the permissions field with the following:

    Code: Select all

    {"access":["user\/user","user\/user_permission"],"modify":["user\/user","user\/user_permission"]}
    
  8. Log in to the admin panel
  9. Go to System>Users>User Groups>Name of User Group, and give yourself all the other required permissions
(That is considering you have phpmyadmin. Depending on how your opencart was ported onto aws, this might not be the case. But anyway, you should probably get in touch with whoever migrated your site to help you with this.)
Not a suggested way as a workaround. Better to do it with converted arrays by queries than directly playing with JSON strings.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by globalmahi » Wed Sep 15, 2021 8:22 am

Gergely wrote:
Tue Sep 14, 2021 5:39 pm
  1. Go to phpmyadmin
  2. Locate the 'user' table (it will have a db prefix, so could be something like 'oc_user' or similar)
  3. Find your username in the username field, and take note of the user_group_id in the same row
  4. Locate the user_group table (it will have the same prefix as the user table)
  5. Find the row with the user_group_id you noted down in step 3
  6. Click on edit
  7. Replace whatever is in the permissions field with the following:

    Code: Select all

    {"access":["user\/user","user\/user_permission"],"modify":["user\/user","user\/user_permission"]}
    
  8. Log in to the admin panel
  9. Go to System>Users>User Groups>Name of User Group, and give yourself all the other required permissions
Its solved...thank your so much...I highly appreciate your kind support.

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by globalmahi » Wed Sep 15, 2021 8:23 am

straightlight wrote:
Tue Sep 14, 2021 5:46 pm
Gergely wrote:
Tue Sep 14, 2021 5:39 pm
  1. Go to phpmyadmin
  2. Locate the 'user' table (it will have a db prefix, so could be something like 'oc_user' or similar)
  3. Find your username in the username field, and take note of the user_group_id in the same row
  4. Locate the user_group table (it will have the same prefix as the user table)
  5. Find the row with the user_group_id you noted down in step 3
  6. Click on edit
  7. Replace whatever is in the permissions field with the following:

    Code: Select all

    {"access":["user\/user","user\/user_permission"],"modify":["user\/user","user\/user_permission"]}
    
  8. Log in to the admin panel
  9. Go to System>Users>User Groups>Name of User Group, and give yourself all the other required permissions
(That is considering you have phpmyadmin. Depending on how your opencart was ported onto aws, this might not be the case. But anyway, you should probably get in touch with whoever migrated your site to help you with this.)
Not a suggested way as a workaround. Better to do it with converted arrays by queries than directly playing with JSON strings.
Thank your so much. Its solved...

Newbie

Posts

Joined
Tue Sep 14, 2021 1:12 pm

Post by straightlight » Wed Sep 15, 2021 9:42 am

Now that the issue has been solved, please add: [SOLVED] at the beginning of the subject line on your first post.

Dedication and passion goes to those who are able to push and merge a project.

Regards,
Straightlight
Programmer / Opencart Tester


Legendary Member

Posts

Joined
Mon Nov 14, 2011 11:38 pm
Location - Canada, ON

Post by thibaultm95 » Thu Sep 22, 2022 10:03 pm

Hi,
I am having the same problem and by following the steps provided above, the issue can be fixed.
To avoid this problem to happen again, I tried to find the root cause without much success, thus I would like to know if somebody would know ?

Newbie

Posts

Joined
Thu Sep 22, 2022 2:15 pm

Post by salvador72 » Sat Sep 30, 2023 6:40 pm

Hi,

can somebody tell me why this happends, I have the same issue.
Everytime I edit many products individial, I lose permissions

txs

Newbie

Posts

Joined
Fri May 18, 2012 12:11 am

Post by ADD Creative » Sun Oct 01, 2023 12:29 am

salvador72 wrote:
Sat Sep 30, 2023 6:40 pm
Hi,

can somebody tell me why this happends, I have the same issue.
Everytime I edit many products individial, I lose permissions

txs
Shouldn't happen as editing a product doesn't modify the user_group table in the database. Could be an issue with your theme or extensions. Could be an issue with your database. What version of OpenCart and PHP. What theme and extensions? Is the Permission Denied! coming from OpenCart (i.e. you have to modify the user_group table in the database to fix it)? Or is the Permission Denied! coming from your hosting?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by salvador72 » Sun Oct 01, 2023 2:02 am

Hi,
What I can say is that when ever I start editing several products and save it ends with "pErmission denided" and everything(config, clientes, modules, etc) desapear or and only few thing remain but not possible to acess.Generaly (as I learn) I copy permissions at mysql, user_groupe, from admin to my user and paste, and everything goes back to normal, some say could be a conflit with extension, but don't now what exectaly, and 'till today no ones comes with a real solution for it.
So I had to make somechanges and by extensions to edit products.

That's what I experience...

Newbie

Posts

Joined
Fri May 18, 2012 12:11 am

Post by ADD Creative » Sun Oct 01, 2023 2:38 am

salvador72 wrote:
Sun Oct 01, 2023 2:02 am
Hi,
What I can say is that when ever I start editing several products and save it ends with "pErmission denided" and everything(config, clientes, modules, etc) desapear or and only few thing remain but not possible to acess.Generaly (as I learn) I copy permissions at mysql, user_groupe, from admin to my user and paste, and everything goes back to normal, some say could be a conflit with extension, but don't now what exectaly, and 'till today no ones comes with a real solution for it.
So I had to make somechanges and by extensions to edit products.

That's what I experience...
It not a common problem and possibley not with OpenCart, which is why there is reported solution.

What version of OpenCart and PHP are you using? What theme and extensions are you using?

www.add-creative.co.uk


Expert Member

Posts

Joined
Sat Jan 14, 2012 1:02 am
Location - United Kingdom

Post by salvador72 » Sun Oct 01, 2023 3:39 am

My open cart is default template, 3.8x version

Newbie

Posts

Joined
Fri May 18, 2012 12:11 am
Who is online

Users browsing this forum: No registered users and 111 guests