403 error while navigating through listview pages

Issue

When I click on a module and hit next page in list view i get 403 error.

Expected Behavior

Navigate to the next page and list in listview next 20 entry’s

Actual Behavior

403 Error

Possible Fix

No ideea

Steps to Reproduce

Click on a module
Hit next page in list view
Hit next page again or back one page
Context

The error from Google Chrome console :
sugar_grp1.js?v=TTIWRGv-KV_NiecCjwgdkg:382 POST http:/…/index.php 403 (Forbidden)

Your Environment

Suitecrm 7.8.1
Chrome Browser

I’ve tried reproducing your bug in 7.8.0 beta (that’s what I have installed in a test system…) on Firefox:

These steps work well, without bug:

  • list contacts
  • press next to see 20 more contacts
  • press next other times

These steps work well, without bug:

  • list contacts
  • press next to see 20 more contacts
  • press previous (arrow near the list) to go back to the initial 20 contacts

These steps give error:

  • list contacts
  • press next to see 20 more contacts
  • press back (the browser button, not a button inside the page)
  • I get a document expired error. If I refresh the browser asks if I want to “resend”, I say yes, I see the correct SuiteCRM page.

Is this what you’re getting, or does it sound very different? Also, can you please try it in another browser?

I’ve tried in Internet Explorer 11 with the same result.

I make exatly the steps that you described but i recive a 403 error when clicking next for the second time or back

Can you see your logs to see if there’s anything suspicious there, at the time when the error occurs?

Apart from that: a 403 errors means your Web server is actively refusing to serve the page, normally this is because of security configurations. The strange thing is that it serves the page once, but not the second time…

May 9 16:48:42 2017 [298906][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/SuiteR/modules is not a file or a dir.
Tue May 9 16:48:42 2017 [298906][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/Suite7/modules is not a file or a dir.
Tue May 9 17:11:30 2017 [330673][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/SuiteR/modules is not a file or a dir.
Tue May 9 17:11:30 2017 [330673][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/Suite7/modules is not a file or a dir.
Tue May 9 17:12:40 2017 [332286][1][FATAL] Failed to load original or custom subpanel data for eapm in modules//metadata/subpanels/.php
Tue May 9 17:14:45 2017 [335036][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/SuiteR/modules is not a file or a dir.
Tue May 9 17:14:45 2017 [335036][1][FATAL] ERROR: rmdir_recursive(): argument cache/themes/Suite7/modules is not a file or a dir.

This is the error that generates in the log

I would prefer to see just a single error from the exact time when you get the problem in the browser - this way it’s difficult to know if I’m looking at the same problem or at something unrelated.

Anyway, you seem to have some problems with your system, can you try a Quick Repair and Rebuild, and check/reset your permissions?

If you need help with that, ask and I can give you more details.

Yes please with the “check/reset your permissions”

List View
Next > Next > 403

Well, checking can be easy - go into Admin/Upgrafe wizard and run the first step of the Wizard (System check).

Don’t worry, this won’t upgrade your system (you don’t even provide an upgrade package at this point). But it will give you a list of files that it can’t write to.

About the resetting, it’s basically running these three commands (but DON’T RUN THEM YET):


    sudo chown -R www-data:www-data .
    sudo chmod -R 755 .
    sudo chmod -R 775 cache custom modules themes data upload config_override.php 

… but first you need to replace “www-data” with your web server user, or else it will break your installation…

Do you know which user your Web server runs under?

My web hosting provider does not allow me to do that.
I only have a Cpanel administrator right.
Can i do this from htaccess config and config_override ?

I’m currently running on php vers 5.6

I don’t know if it is possible, or how it could be done.

Perhaps you can email your hosting and give them those commands, and ask for them to check the current state, and perhaps reset the permissions?

1 Like

By the way, a very similar issue in the Spanish forums was just solved.

The service providers turned off something called “modsecurity” and it started working. That’s basically a module to strengthen security of the web server, but it seems it’s too strict for SuiteCRM.

1 Like

Just to let you know that I am also having this issue. It started five days ago for no apparent reason. I have written to my host to see if they have applied the modsecurity thing. I will report back when I hear from them.

It’s working again! Here is the reply from my server:

Hi Dave,

Thanks for your eTicket today.

I have checked the logs and it seems a modsec rule was being triggered and causing the sever to block you. I have since whitelisted this rule and it shouldn’t happen again, however sometimes multiple rules can be triggered for the same event, and we can’t see the second until we clear the first. Please let us know if you are still having an issue and we can check to see if another modsec rule is being triggered.

If you have any other queries or concerns don’t hesitate to contact us!

Regards,

Bradley Silverman
VentraIP Australia Technical Support

1 Like

:cheer: Thank you so much @pgr ! You rock B)
We disabled “modsecurity” from cpanel, no need to call the hosting providers and everything works fine now.

Hi

I had and error selecting multiple products to delete, turning off modsec corrected my problem

Thank you

1 Like