Basic System Security

  1. Restrict file/folder permissions:
  • Use the command: sudo chown -R www-data:www-data /var/www/html/moodle
  • sudo chmod -R 755 /var/www/html/moodle
  1. Prepare backup and upload directories
  • Create a separate directory for backup and document storage with the command:
  • sudo mkdir /var/www/moodle_backup
  • sudo chown www-data:www-data /var/www/moodle_backup
  1. Check if cron is running correctly:
  • Run the command: sudo -u www-data /usr/bin/php /var/www/html/moodle/admin/cli/cron.php Connect
  • If the system prints “Cron script completed correctly”, it’s Complete !.