Jump to content

Permission denied after upgrade


Recommended Posts

I've just upgraded a 1.6 install to the latest 1.7 with a 1-click upgrade (as the manual method is deprecated).
The upgrade did not work well. Quite a few modules had errors.
But after renaming the `advancedeucompliance` modules I was able to finish the updates of all but the `ebay` module.

Then I noticed some `permission denied` errors. E.g. when just opening the "Orders" page.
I am a "SuperAdmin" so this should not be the case.

When searching the forum someone suggested to check a few tables in the db.
Someone else suggested this might be because I am having multiple languages.
Looking at `ps_tab_lang` the table looks suspicious:

mysql> select * from ps_tab_lang;
+--------+---------+-----------------------+
| id_tab | id_lang | name                  |
+--------+---------+-----------------------+
|    101 |       1 | BlockCategories       |
|    101 |       2 | BlockCategories       |
|    102 |       1 | Dashgoals             |
|    102 |       2 | Dashgoals             |
|    103 |       1 | themeconfigurator     |
|    103 |       2 | Theme Configurator    |
|    104 |       1 | Merchant Expertise    |
|    104 |       2 | Merchant Expertise    |
|    105 |       1 | Cron Jobs             |
|    105 |       2 | Cron Jobs             |
|    107 |       1 | tmhtmlcontent         |
|    107 |       2 | tmhtmlcontent         |
|    108 |       1 | magnalister           |
|    108 |       2 | magnalister           |
|    109 |       1 | magnalister Admin     |
|    109 |       2 | magnalister Admin     |
|    110 |       1 | Google Analytics Ajax |
|    110 |       2 | Google Analytics Ajax |
|    111 |       1 | 1-Click Upgrade       |
|    111 |       2 | 1-Click Upgrade       |
|    112 |       1 | Dashboard             |
|    113 |       1 | Sell                  |
|    114 |       1 | Orders                |
|    115 |       1 | Orders                |
|    116 |       1 | Invoices              |
|    117 |       1 | Credit Slips          |
|    118 |       1 | Delivery Slips        |
|    119 |       1 | Shopping Carts        |
|    120 |       1 | Catalog               |
|    121 |       1 | Products              |
|    122 |       1 | Categories            |
|    123 |       1 | Monitoring            |
|    124 |       1 | Attributes & Features |
|    125 |       1 | Attributes            |
|    126 |       1 | Features              |
|    127 |       1 | Brands & Suppliers    |
|    128 |       1 | Brands                |
|    129 |       1 | Suppliers             |
|    130 |       1 | Files                 |
|    131 |       1 | Discounts             |
|    132 |       1 | Cart Rules            |
|    133 |       1 | Catalog Price Rules   |
|    134 |       1 | Stocks                |
|    135 |       1 | Customers             |
|    136 |       1 | Customers             |
|    137 |       1 | Addresses             |
|    138 |       1 | Outstanding           |
|    139 |       1 | Customer Service      |
|    140 |       1 | Customer Service      |
|    141 |       1 | Order Messages        |
|    142 |       1 | Merchandise Returns   |
|    143 |       1 | Stats                 |
|    145 |       1 | Warehouses            |
|    146 |       1 | Stock Management      |
|    147 |       1 | Stock Management      |
|    148 |       1 | Stock Movement        |
|    149 |       1 | Instant Stock Status  |
|    150 |       1 | Stock Coverage        |
|    151 |       1 | Supply orders         |
|    152 |       1 | Configuration         |
|    153 |       1 | Improve               |
|    154 |       1 | Modules               |
|    155 |       1 | Modulmanager          |
|    156 |       1 | Modules               |
|    156 |       2 | Modules               |
|    157 |       1 | Benachrichtigungen    |
|    157 |       2 | Alerts                |
|    158 |       1 | Updates               |
|    158 |       2 | Updates               |
|    159 |       1 | Module Catalog        |
|    159 |       2 | Module Catalog        |
|    160 |       1 | Versanddienst         |
|    160 |       2 | Module Catalog        |
|    161 |       1 | Auswahl von Modulen   |
|    163 |       1 | Design                |
|    164 |       1 | Theme & Logo          |
|    165 |       1 | Theme Catalog         |
|    166 |       1 | Email Theme           |
|    166 |       2 | Email Themes          |
|    167 |       1 | Email Theme           |
|    167 |       2 | Email Themes          |
|    168 |       1 | Pages                 |
|    169 |       1 | Positions             |
|    170 |       1 | Image Settings        |
|    171 |       1 | Shipping              |
|    172 |       1 | Carriers              |
|    173 |       1 | Preferences           |
|    174 |       1 | Payment               |
|    175 |       1 | Payment Methods       |
|    176 |       1 | Preferences           |
|    177 |       1 | International         |
|    178 |       1 | Localization          |
|    179 |       1 | Localization          |
|    180 |       1 | Languages             |
|    181 |       1 | Currencies            |
|    182 |       1 | Geolocation           |
|    183 |       1 | Locations             |
|    184 |       1 | Zones                 |
|    185 |       1 | Countries             |
|    186 |       1 | States                |
|    187 |       1 | Taxes                 |
|    188 |       1 | Taxes                 |
|    189 |       1 | Tax Rules             |
|    190 |       1 | Translations          |
|    191 |       1 | Configure             |
|    192 |       1 | Shop Parameters       |
|    193 |       1 | General               |
|    194 |       1 | General               |
|    195 |       1 | Maintenance           |
|    196 |       1 | Order Settings        |
|    197 |       1 | Order Settings        |
|    198 |       1 | Statuses              |
|    199 |       1 | Product Settings      |
|    200 |       1 | Customer Settings     |
|    201 |       1 | Customers             |
|    202 |       1 | Groups                |
|    203 |       1 | Titles                |
|    204 |       1 | Contact               |
|    205 |       1 | Contacts              |
|    206 |       1 | Stores                |
|    207 |       1 | Traffic & SEO         |
|    208 |       1 | SEO & URLs            |
|    209 |       1 | Search Engines        |
|    210 |       1 | Referrers             |
|    211 |       1 | Search                |
|    212 |       1 | Search                |
|    213 |       1 | Tags                  |
|    214 |       1 | Advanced Parameters   |
|    215 |       1 | Information           |
|    216 |       1 | Performance           |
|    217 |       1 | Administration        |
|    218 |       1 | E-mail                |
|    219 |       1 | Import                |
|    220 |       1 | Team                  |
|    221 |       1 | Employees             |
|    222 |       1 | Profiles              |
|    223 |       1 | Permissions           |
|    224 |       1 | Database              |
|    225 |       1 | SQL Manager           |
|    226 |       1 | DB Backup             |
|    227 |       1 | Logs                  |
|    228 |       1 | Webservice            |
|    229 |       1 | Multistore            |
|    230 |       1 | Multistore            |
|    231 |       1 | Quick Access          |
|    232 |       1 | More                  |
|    234 |       1 | Stock                 |
|    235 |       1 | Link Widget           |
|    235 |       2 | Link Widget           |
|    236 |       1 | blockreassurance      |
|    236 |       2 | blockreassurance      |
|    237 |       1 | PayPal Official       |
|    237 |       2 | PayPal Official       |
|    238 |       1 | Configuration         |
|    238 |       2 | Configuration         |
|    239 |       1 | Einstellungen         |
|    239 |       2 | Setup                 |
|    240 |       1 | User Experience       |
|    240 |       2 | Experience            |
|    241 |       1 | Hilfe                 |
|    241 |       2 | Help                  |
|    242 |       1 | Logs                  |
|    242 |       2 | Logs                  |
|    243 |       1 | Logger                |
|    243 |       2 | Logger                |
+--------+---------+-----------------------+


It would have thought all should be duplicated. Basically one entry for each per language.
But some have two entries of the same language!

Another table that looks weird is `ps_access`. All 3 user/profiles are `SuperAdmins` - shouldn't they all have the same roles assigned?

 

mysql> select count(*) from ps_access where id_profile = 1;
+----------+
| count(*) |
+----------+
|      496 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from ps_access where id_profile = 2;
+----------+
| count(*) |
+----------+
|       98 |
+----------+
1 row in set (0.00 sec)

mysql> select count(*) from ps_access where id_profile = 3;
+----------+
| count(*) |
+----------+
|       22 |
+----------+
1 row in set (0.00 sec)

 

Link to comment
Share on other sites

I am tempted to do something along the lines of

DELETE FROM ps_access WHERE id_profile = 3;
INSERT INTO ps_access (
  SELECT (3) as id_profile, id_authorization_role FROM ps_authorization_role order by id_authorization_role
)

to fix the permissions for user 3.

Is that OK?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...