Can't upload files

Re: Can't upload files

by James Gardner -
Number of replies: 0

I tried everything suggested in this tread e.g. setting all permissions 777, setting user:group apache, setting uploadtempdir, etc.

What worked for me was turning off SELinux e.g.  setenforce 0

The following note on the following link specifies how to create the correct SELinux security policy which will allow you to upload files using moodle . . .

Note: If you are installing Moodle on a server that supports SELinux (e.g. RedHat or Fedora desktop) then you will need to ensure that your data directory's security context is set correctly. httpd_sys_content_rw_t is required for all content which needs to available to httpd scripts. Use the chcon command to set the context, for example chcon -R -t httpd_sys_content_rw_t var/www/moodledata

http://docs.moodle.org/20/en/Creating_Moodle_site_data_directory

Thanks