Upload files not working

Upload files not working

by Javier Mudelano -
Number of replies: 4

Hello friends

I am the administrator of four Moodle installations in the same shared hosting. Suddenly, none of them allow uploading file, but before all of them work perfectly. Now, the icon is spinning all the time, as you can see in the attached image.

I have checked everything: upload limits in php.ini, claw av deactivated, moodledata forlder permissions (777), yui deactivated,etc.

When I open the Chrome console, after selecting the file to upload and click on "upload this file", it makes a connection with repository_ajax.php?action=upload and after it receives a "403 Forbidden" error. The Moodle's debugging options does not give any informacion. I think it has to be some problem with the hosting configuration, because the error is the same in all the installations (2.9.9 and other versions), in the same server. Perhaps some Apache security option? Before talking with the hosting support staff I would like to ask if anyone has a solution.

Thanks

Javier


Attachment Captura.PNG
Average of ratings: -
In reply to Javier Mudelano

Re: Upload files not working

by Ken Task -
Picture of Particularly helpful Moodlers

403 error means 'access denied'.   That's probably an ownerships/permissions issue on /tmp or possibly you've reached a space limit on hosting ... since you mentioned 4 sites on shared?!!!  

Each one of those has it's own moodledata directory and typically in there filedir (where files uploaded to moodle reside) is the largest in size.

What is capacity of your space - max - how much remaining?

Also, is site now running something like mod_security or other protective php thang that is now not allowing uploads?

If you don't know answers to questions above, or can't find out yourself, then the only help you are going to get is hosting providers.   Those of us in these forums that could help don't host where you host (more than likely).

'SoS', Ken

In reply to Ken Task

Re: Upload files not working

by Javier Mudelano -
Hi Ken!

Yes, 4 sites are too much sites, although I have a premium shared hosting with enough SSD space, memory and several CPU cores dedicated and they are running fantastically.

I think the mod_security that you suggest may is a good starting point. I will ask the server administrador to check it.

Thank you Ken !!
Javier
In reply to Javier Mudelano

Re: Upload files not working

by Javier Mudelano -
Hello

If anyone has the same issue, in fact, the problem was the security module of Apache (ModSecurity). Fortunately, I could find this option in the administration panel of my hosting (CPanel), I disabled it and ... It works again!

Thank you
Average of ratings: Useful (1)
In reply to Javier Mudelano

Re: Upload files not working

by Ken Task -
Picture of Particularly helpful Moodlers

Shared hosting means you might not be able to do this, but ... worth a look:

https://www.digitalocean.com/community/tutorials/how-to-set-up-mod_security-with-apache-on-debian-ubuntu

Section on
Configuring mod_security

Out of the box, modsecurity doesn’t do anything as it needs rules to work. The default configuration file is set to DetectionOnly which logs requests according to rule matches and doesn’t block anything.

You, the op, could then see what rules were triggered and 'whitelist' them.

Once mod_security stops complaining, turn it on.

'SoS', Ken