403 Forbidden to /mod/lesson/view.php

403 Forbidden to /mod/lesson/view.php

by Dale Wellman -
Number of replies: 3

After upgrading to 4.0.1, I'm having trouble during basic quiz navigation.  I have lessons configured to display feedback after each question/answer.  When I go into a lesson and answer the first question, it successfully displays my result and feedback, but when I press the "Continue" button to advance to the next question, I get a "403 Forbidden" error from my server, and it says it cannot access the /mod/lesson/view.php file.   Yet, my view.php has 644 permissions and the directories are all set for 755.

This is on a HostPapa hosted site.  I'm searching for other clues and logs, but so far, I'm not seeing any additional clues.

standard 403 Forbidden page, regarding /moodle/mod/lesson/view.php file


Average of ratings: -
In reply to Dale Wellman

Re: 403 Forbidden to /mod/lesson/view.php

by Ken Task -
Picture of Particularly helpful Moodlers

Suggest turning on Debugging in Moodle and let's see if we can't get moodle to tell us ... what you've shown is a cPanel/Web Services error....

May not be ownerships/permissions issue but a WAF issue.   Do you have something like a web application firewall installed?  IF so, some rule was triggered and the custom web service error you see isn't really the rule/error triggered.

Hmmmm ... according to:

https://www.hostpapa.com/knowledgebase/how-to-install-moodle/

So was this a Softaculous upgrade from what version of Moodle prior?  Got a site backup (just in case).

Appears hosting provider does have quite a few docs for Moodle 3 but not 4 ... yet:

https://www.hostpapa.com/knowledgebase/article-categories/moodle/

'SoS', Ken

In reply to Dale Wellman

Re: 403 Forbidden to /mod/lesson/view.php

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers
If you can... check the web server error log. It sounds more like a web server error than a Moodle error. The log should have the rest of the story.
In reply to Dale Wellman

Re: 403 Forbidden to /mod/lesson/view.php

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

Unexpected 403s could be a WAF like ModSecurity. If this is enabled try turning it off for the site.