General developer forum

Cannot create local pool directories,Please verify permissions in data root

 
Picture of Saron Edward
Cannot create local pool directories,Please verify permissions in data root
 

While uploading assignments students are getting following message "Cannot create local pool directories,Please verify permissions in data root"  randomly.There is no issues in folder permissions.Can someone help me to find root cause of this issue?


 
Average of ratings: -
Gareth J Barnard
Re: Cannot create local pool directories,Please verify permissions in data root
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

Hi Saron,

Are you sure there are no issues with the dataroot folder (look in config.php in / for where its defined)?

G

 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 
There are no issues with the dataroot folder. Students can upload assignments. But only some students have faced the above issue(Cannot create local pool directories,Please verify permissions in data root) during upload.i really dont know the root cause of this issue.
 
Average of ratings: -
Picture of Ken Task
Re: Cannot create local pool directories,Please verify permissions in data root
Group Particularly helpful Moodlers

Is data root or filedir in moodleata a mount point?   Site using NFS?   Something other than moodledata as a directory on the same physical hard drive of the server where the code resides?

Check apache error logs.

There is a line you might add to your config.php from config-dist.php dealing with file locking:

// Some filesystems such as NFS may not support file locking operations.
// Locking resolves race conditions and is strongly recommended for production servers.
//     $CFG->preventfilelocking = false;

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 

I have checked the apache error logs.There are no logs.


We have enabled preventfilelocking by

$CFG->preventfilelocking=True;


does this related to this issue?

 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 

Any updates regarding this?

 
Average of ratings: -
Picture of Ken Task
Re: Cannot create local pool directories,Please verify permissions in data root
Group Particularly helpful Moodlers

Well, it's kinda obvious that many many many folks aren't having this same issue or there would be many many many post saying 'me too' or other.

@Gareth asked you to double check or verify ownerships/permissions of moodledata.   Did you?  What are they?

Had asked a couple of questions myself which related to the setting and comments in the config-dist.php file suggested to you that *might fix* ...  repeated below ...

"Is data root or filedir in moodleata a mount point?   Site using NFS?   Something other than moodledata as a directory on the same physical hard drive of the server where the code resides?"

I currently don't have this same issue ... but then again, don't have moodledata as a mount point and sites are not using an NFS server for moodledata.

There are multiple ways to setup and run a Moodle - not everyone does things the same way ... so stupid questions like mine must be tolerated IF not enough information has been provided about the setup.  ;)

I don't possess Vulcan Mind Meld abililty! ;) (ref: StarTreck character Spock)

'spirit of sharing', Ken


 
Average of ratings: -
Gareth J Barnard
Re: Cannot create local pool directories,Please verify permissions in data root
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

Hi Saron,

In addition to what Ken has said, I've just spent 30 seconds Googling 'moodle local pool directories' and found MDL-43160 as the second result, which may help.

G

 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 

Hi Ken and Gareth,

Thanks for your reply.

For moodledata directory


 Permission    - drwxrwxrwx

Owner/group - root


anything i missed out ?




 
Average of ratings: -
Picture of Ken Task
Re: Cannot create local pool directories,Please verify permissions in data root
Group Particularly helpful Moodlers

@Gareth was correct ...

owner/group of moodledata and all files/folders internal should be the user under which apache service runs.

On CentOS typically that is apache:apache

On Ubuntu typically that is www-data:www-data

On other 'flavor', check the config file for the apache web service.

If remotely hosted on shared server then check provider's documentation.

'spirit of sharing', Ken

 
Average of ratings: -
Gareth J Barnard
Re: Cannot create local pool directories,Please verify permissions in data root
Group Core developersGroup Particularly helpful MoodlersGroup Plugin developers

Just checked my Ubuntu install at moodledata is www-data for user and root for group, but everything underneath is www-data:www-data.  I followed (sort of) https://docs.moodle.org/33/en/Step-by-step_Installation_Guide_for_Ubuntu#Step_5:_Copy_local_repository_to_.2Fvar.2Fwww.2Fhtml.2F.

 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 

In my case moodledata is root:root. everything underneath is www-data:www-data

does this make issue? if yes why only some users facing this issue? 

In my development server i have the same permissions but i could not reproduce this issue.

any ideas?

 
Average of ratings: -
Picture of Saron Edward
Re: Cannot create local pool directories,Please verify permissions in data root
 

We don't have moodledata as a mount point and sites are not using an NFS . We are using ext4 file system.

is there anyway to reproduce this issue?  because we dont know in which scenario it happens.

 
Average of ratings: -
Picture of Ken Task
Re: Cannot create local pool directories,Please verify permissions in data root
Group Particularly helpful Moodlers

What are the parameters for the assignment? Are students submitting multiple files?  Are students allowed to re-submit?   Are students uploading files that have no file name extensions?   All students using the same devices?   Any role overrides for the student role?

And absolutely nothing in apache error logs?

'spirit of sharing', Ken


 
Average of ratings: -
Picture of Ken Task
Re: Cannot create local pool directories,Please verify permissions in data root
Group Particularly helpful Moodlers

One more thought ...

fgrep 'temp' /etc/php.ini

or same for upload_tmp_dir

'spirit of sharing', Ken

 
Average of ratings: -