Weekly global permission reset causing chaos

Weekly global permission reset causing chaos

by Kai Timms -
Number of replies: 6
Hi there,

Apologies if this isn't the right place but I'm have a nightmare figuring out this problem. Ever since I got the cron up and running for moodle (using an Ubuntu server) every week (either Sunday or Monday) something triggers to reset the global permissions, causing the error attached to appear for all users. I can reset this quickly in the terminal using the following:
sudo chown -R www-data /var/moodledata 
sudo chmod -R 777 /var/moodledata 
sudo chmod -R 755 /var/www/html/moodle 

But now it has started to do it at seemingly random points on the Monday. I have checked the syslog and can't see anything that seems to be triggering it in there.

If anyone can provide some insight I would be very greatful,
Attachment thumbnail_image.png
Average of ratings: -
In reply to Kai Timms

Re: Weekly global permission reset causing chaos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
Do you run Cron in the crontab of the owner of the web server process, in your case www-data?
In reply to Visvanath Ratnaweera

Re: Weekly global permission reset causing chaos

by Kai Timms -
It has been running from the /etc/ folder crontab under the admin login. I was only aware of that way to set it up, but if there is a different place then I would be grateful for guidance
In reply to Kai Timms

Re: Weekly global permission reset causing chaos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
In reply to Visvanath Ratnaweera

Re: Weekly global permission reset causing chaos

by Kai Timms -
I've done this (turns out it was running in www-data and root), but now my ad hoc tasks aren't firing automatically. Any ideas?
In reply to Kai Timms

Re: Weekly global permission reset causing chaos

by Visvanath Ratnaweera -
Picture of Particularly helpful Moodlers Picture of Translators
> I've done this

What is "this"?

> turns out it was running in www-data and root

How does one understand that? cron.php was kicked twice? How often? From and by whom?

What is the output of '# crontab -u www-data -e'? Is there anything relevant in /etc/init.d/? If so, could you name the relevant files and copy their content to the post?

P.S. You are right. Hardware and performance is not the right place. Better suited for the Installing and upgrading forum.

In reply to Visvanath Ratnaweera

Re: Weekly global permission reset causing chaos

by Mary Cooch -
Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Testers Picture of Translators
Moved to Installing and upgrading.