Could not find or create a directory

Could not find or create a directory

by Allen Way -
Number of replies: 13

Installed 1.9.9 via automated installer script on hosted Linux server. Every time Moodle wants to create a new director under moodledata, I get that error. Permissions are 777, owner is me, safe_mode is off. Any suggestions?

 

--Allen

Average of ratings: -
In reply to Allen Way

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

This happened with a site I was managing, it was due to the way it was set up on the server. I think related to .htaccess and the fact the moodledata file was in an area of the site which was designated 'private, so the 777 was as it were being overridden. Atleast this is how I understood it to be.

HTH

Mary

In reply to Mary Evans

Re: Could not find or create a directory

by Allen Way -

Mary,

Thanks for the reply.

My moodledata is publicly accessable. I still get the Moodle notice that it may be insecure. (I'm thinking of getting it a night light. <g>) The .htaccess file is the standard one that Moodle installed. I wondered if the .htaccess could be overriding the 777 so I disabled it. Moodle REALLY threw up the red flags then but it still couldn't make directories under moodledata. I can do it manually via FTP or the host's CP but that's a giant pain in the posterior.

I also tried moving moodledata out of the web accessable directory as suggested in the notification area. I got an error saying it must be web server writeable. I can't win.

--Allen

In reply to Allen Way

Re: Could not find or create a directory

by Allen Way -

I still have not found a solution to this dilemna. I'm very disappointed. Moodle is worthless to me this way.

--Allen

In reply to Allen Way

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Have you activated the 'My Files' option?

In the Add Block option when editing is on, you can add My Private Files, but not having used them, I'm not sure if these are what you want.

There is another option I came accross in Admin setting, can't for the life of me think where, may be under Server? I'm not sure, but there is an option to set up, or restore, what is know as Legacy Files, which is I think the old Moodle Files, which were I suspect the Moodledata folders where you could upload stuff to, make new folders and organise your images and documents and such.

Hope this is of help?

Mary

In reply to Mary Evans

Re: Could not find or create a directory

by Allen Way -

Mary,

Thanks for the info. I looked in the Add Block but didn't find a My Private Files. I also looked in all the Admin links and found nothering that looked relevant to the moodledata permissions, etc.

Thanks anyway,

--Allen

In reply to Allen Way

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Which version of Moodle are you using?

I use Moodle 2.1 and you can add a block which when set up gives you access to you own files where you can create folders and upload files.

This was introduced last year into Moodle 2 but has been refined over the months to what it is now. Perhaps the ability to add it as a block in Add Blocks may be peculiar to Moodle 2.1, I am not sure. 

Mary

In reply to Mary Evans

Re: Could not find or create a directory

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators

Allen -  I think higher up this thread you said you were using 1.9? In which case you won't have the private files block option.

In reply to Mary Cooch

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Sorry Alan,

What I wrote earlier I had it in my head you were talking about Moodle 2.

My recent comments, regarding the Add Blocks and private files and such are irrelevant if you are using Moodle 1.9.

Apologies

Mary E

 

 

In reply to Mary Evans

Re: Could not find or create a directory

by Allen Way -

Mary,

No worries. Been there more times than I care to admit. <g>

--Allen

In reply to Mary Evans

Re: Could not find or create a directory

by Allen Way -

I'm using version 1.9.9. It is installed on a hosted linux system w/ PHP 5.2.8. I can create the needed subdirectories under moodledata via the CP or FTP but that is not at all practical as each course wants to create its own subdirectories.

--Allen

In reply to Allen Way

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

Allen,

The problem with Moodle is that it works well on some servers and not others. cPanel seems to corrupt the config.php. I'm not quite sure how or why but it does.

How about deleting this pre-installed version and uploading a fresh copy of say Moodle 1.9.12 Weekly ?  If you have FTP you could do this easily enough. Might take you all afternoon, but by the time you have it running you would know much more about it. It's a piece of cake really. All you need to do first is create a Database using your cPanel's phpMyAdmin, just make sure you have collation set to utf8_unicode_ci and mysql collation set to the same utf8_unicode_ci.

After creating the database you do nothing other than to set Privileges whilst still in phpMyAdmin, which you do by clicking the tab marked 'Privileges', here you would need to Add New User. Keep this username and password handy together with the name of the database as these are required when you come to install Moodle.

Let Moodle set the Moodledata folder - infact you can say what name you want it to use, and Moodle will set it up for you.

Not what you really wanted to hear...but it may be your only option!

Mary

In reply to Mary Evans

Re: Could not find or create a directory

by Allen Way -

Mary,

No joy in Mudville. I tried installing a separate Moodle 1.9 manually. I ran into the same permission problem while running the install script; it would not go further. It seems that CPanel systems and Moodle do not work & play well together.

It is time to call it: time of death 16:22.

--Allen

In reply to Allen Way

Re: Could not find or create a directory

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers

@}-'-,---

A single rose adorns the coffin
Sincere Condolances
RIP