Permission issues with scheduled backup

Created on 24 December 2024, about 1 month ago

Problem/Motivation

A schedules backup to the destination in the private file system returns a permission error:

Scheduled backup 'Daily backup' failed: The backup file could not be saved to 'private://backup_migrate/daily' because the directory could not be created or cannot be written to. Please make sure your private files directory is writable by the web server.

However a manual backup to that same destination completes successfully.

Steps to reproduce

Set a destination as private://backup_migrate/daily
Confirm that the service account running php-fpm is the owner and has RWX permissions of private://backup_migrate and private://backup_migrate/daily
Set a scheduled backup (default profile/no profile set) that uses this destination.
Wait for cron to run the schedule and see the error on the event log

Confirm that the permissions at the destination are correct by performing a manual backup using that destination (default profile/no profile set).

🐛 Bug report
Status

Active

Version

5.1

Component

Code

Created by

🇨🇦Canada cdeces

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @cdeces
  • 🇨🇦Canada cdeces

    Actually, the permission issue was that I was running the cron job under a user account that didn't have permission to write in the destinations folders, AND I was using the command "drush cron" instead of "wget https://..."

Production build 0.71.5 2024