by Zied ALAYA.
thanks Visvanath.
yes it looks like that.
I verified $CFG->dataroot in config.php and the directory permissions (I have even changed to read write for all users).
I can also login to website and download files from courses.
Still have the issue :/