Receiving the following after doing an upgrade from 7.x-2.2 to 7.x-2.3.

Warning: fopen(private://backup_migrate/manual/test.txt): failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed in backup_migrate_destination_files->check_web_dir() (line 207 of path_to_Drupal/sites/default/modules/backup_migrate/includes/destinations.file.inc).
Security notice: Backup and Migrate was unable to write a test text file to the destination directory private://backup_migrate/manual, and is therefore unable to check the security of the backup destination. Backups to the server will be disabled until the destination becomes writable and secure.'

The directory permissions are 775 for the directory path and working fine with the prior version.

Thoughts and feedback are welcomed. Thanks in advance.

Comments

aitala’s picture

I have seen the same issue.

Eric

LinuxETC’s picture

Version: 7.x-2.3 » 7.x-2.4
Issue tags: +Security, +backup and migrate module

Same error messages for v7.x-2.4 now as well. Copy of the full error page (with the Drupal base redacted) is as follows:

  • Warning: fopen(private://backup_migrate/manual/test.txt): failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed in backup_migrate_destination_files->check_web_dir() (line 207 of "path to Drupal site here"/sites/default/modules/backup_migrate/includes/destinations.file.inc).
  • Security notice: Backup and Migrate was unable to write a test text file to the destination directory private://backup_migrate/manual, and is therefore unable to check the security of the backup destination. Backups to the server will be disabled until the destination becomes writable and secure.
  • Warning: fopen(private://backup_migrate/manual/test.txt): failed to open stream: "DrupalPrivateStreamWrapper::stream_open" call failed in backup_migrate_destination_files->check_web_dir() (line 207 of "path to Drupal site here"/sites/default/modules/backup_migrate/includes/destinations.file.inc).
  • Security notice: Backup and Migrate was unable to write a test text file to the destination directory private://backup_migrate/manual, and is therefore unable to check the security of the backup destination. Backups to the server will be disabled until the destination becomes writable and secure.
  • Could not run backup because the file could not be saved to the destination.

Have tried various permissions for the "write" on user, group, and others for the directory path with no success still.

The only alternative I have in mind is to downgrade to v7.x-2.2 at this point so that backups can be performed on the various and multiple sites using this module since I believe that was the last version which was working without this bug.

Feedback and questions are welcomed. Thanks in advance.

LinuxETC’s picture

Update with work around.

Current work around is to turn off the scheduler and manually download the backups. Granted this defeats the purpose of doing automated backups to the local system, but a work around none the less.

Anyone looking into this? Thanks in advance.

francewhoa’s picture

Same here on a few sites

Have you tried setting the test text file permission to 775? That might fix it. The file is located at backup_migrate/manual/test.txt and backup_migrate/scheduled/test.txt

LinuxETC’s picture

Status: Active » Fixed

@Francewhoa:

Thanks, I overlooked that. Changing the permissions to 775 for the "test.txt" file in both the manual and scheduled directories resolved this issue.

Closing it out accordingly.

Automatically closed -- issue fixed for 2 weeks with no activity.