Quantcast
Channel: Backup and restore
Viewing all articles
Browse latest Browse all 6815

Re: Automated Course Backup

$
0
0
by Svenja Lell.  

Hi Emma,

that's of course a good guess ... but www-data user which runs the Moodle cronjob as sufficient privileges to delete the files in the trashfolder.

1.) This is our datafolder:

root@moodleserver:/data2/moodle# ls -al
...
drwxrwxrwx 10 www-data www-data 12288 Nov 13 14:11 temp
drwxrwxrwx 7 www-data www-data 4096 Nov 13 18:17 trashdir
root@moodleserver:/data2/moodle#


2.) example file


root@moodleserver:/data2/moodle/trashdir/2a/ce# ls -al
total 116
drwxrwxrwx 2 www-data www-data 4096 Nov 13 16:00 .
drwxrwxrwx 3 www-data www-data 4096 Nov 13 16:00 ..
-rw-rw-rw- 1 www-data www-data 110558 Nov 5 02:17 2aceeef381c2fe005f56a4d110c045ba549855f5

3.) deletion with www-data - user is possible:

root@moodleserver:/data2/moodle/trashdir/2a/ce# sudo -u www-data /bin/rm /data2/moodle/trashdir/2a/ce/2aceeef381c2fe005f56a4d110c045ba549855f5
root@moodleserver:/data2/moodle/trashdir/2a/ce# ls -al
total 8
drwxrwxrwx 2 www-data www-data 4096 Nov 13 17:26 .
drwxrwxrwx 3 www-data www-data 4096 Nov 13 16:00 ..
root@moodleserver:/data2/moodle/trashdir/2a/ce#

So the privileges are set very generously. Maybe too generously.

However, the prob is right here. The cronjob does not kill the files in the trash folder. Here is root's crontab:

*/15 * * * * sudo -u www-data /usr/bin/php /path/to/moodle/cron.php > /dev/null 2>&1

Can you get me started how to find a solution ? Orphaned files ?


Thanks for you help!


Kind Regards,


Svenja Lell

Viewing all articles
Browse latest Browse all 6815

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>