Error - Magento 1: Not enough permissions to create backup Print

  • M1
  • 13

Issue:

When I try to do a system backup on Magento 1.7*, I get the following error: not enough permissions to create backup.

This is due to insufficient permissions for Magento to read all files. If you are sure that your file and folder permissions are set correctly, then it is most likely due to permissions of /mage in your Magento web root directory. By default this is set to 0550, but you may need to change this to 0644 in order to be readable.

If you re-run the backup and still get the error then you will need to create a local override file to determine which files are causing the error. So to check which files are causing the issue:

- Check that you have logging enabled (in Configuration > Advanced > Developer). 
- Copy lib/Mage/Backup/Filesystem/Helper.php into app/code/local/Mage/Backup/Filesystem/Helper.php (if the target folders don't exist then you must create them)
- Edit app/code/local/Mage/Backup/Filesystem/Helper.php at around line 126:

Change

//if (($infoOptions & self::INFO_READABLE) && !$item->isReadable()) {
//    $info['readable'] = false;
//}



To:

if (($infoOptions & self::INFO_READABLE) && !$item->isReadable()) {
Mage::log($item->getPathname(), null, 'backup_not_readable_files.log');
$info['readable'] = false;
}



- Re-run the system backup (System > Tools > Backups: System Backup) and check in your log folder (var/log/) for a file named backup_not_readable_files.log. This should list the files with the wrong permissions.
- Correct any file ownership or permissions issues with those files and repeat the backup re-run as above until it succeeds.
- Now either delete the local override or leave it in place so that you can fix any future file/folder permissions with system backups.


Was this answer helpful?

« Back