0

I am trying to install moodle onto my web sever, but it can't create the moodle data directory, because of missing write permissions:

Parent directory (/var/www) is not writeable. Data directory (/var/www/moodledata) cannot be created by the installer. I have tried to set chmod 777 & 666 to the www directory, but it still doesn't work...

ls -al result:

drwxrwsrwx+  4 apache apache   31 Dec  8 15:49 www

Edit:

My permissions for the www folder are just ultimately messed up, because i don't understand a thing about permissions could someone help me fix them up? I need to also allow sftp_users group to access the files:

ls -al on www:

drwxrwsrwx+  5 apache sftp_users   48 Dec  8 19:35 www

ls -al inside www:

drwxrwsrwx+  5 apache sftp_users   48 Dec  8 19:35 .
drwxr-xr-x. 22 root   root       4096 Dec  8 17:29 ..
drwxrwx---.  2 root   sftp_users    6 Aug 24 21:12 cgi-bin
drwxrws---+  3 root   sftp_users   35 Dec  8 19:36 html
drwxrwsr-x+  2 root   sftp_users    6 Dec  8 19:35 moodledata
  • moodle.org/mod/forum/discuss.php?d=164786 - scroll to bottom answer by Jason Vore... Do you have root/SSH access to your server? – Kinnectus Dec 8 '15 at 17:27
  • Not root ssh access, but ssh access. – Jojo Coana Dec 8 '15 at 17:30
  • Very late response, but for other searchers: computer programming questions like this should rather be asked at StackOverflow.com (they actually have a Moodle tag) – Ochado Apr 29 '18 at 2:13
  • I would disagree. This is clearly not about programming (though I understand why StackOverflow might have a moodle tag). Assuming this wouldn't be appropriate here (since the software under discussion is a CMS), it would almost certainly be more appropriate for the Webmasters SE (which has a moodle tag as well). – Anaksunaman Apr 29 '18 at 7:47
0

It could be that selinux is blocking access. Check it with command getenforce. If the result is Enforce, then you may want to change it to Permissive, with command setenforce 0 or setenforce Permissive. You can also disable selinux by editing /etc/selinux/config and setting SELINUX = disabled. Reboot would be required in that case. Also - is the directory ./moodledata a www directory for moodle or is it directory for file storage? If the second case, best is to move it outside the www directory, a designated directory in / like /moodledata and then set permissions on that directory for apache (or put this folder on separate disk or SAN share or NFS).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.