ECommerce Insights Blog

Stay on top of it all and get ahead with useful articles, how-tos, tips and tricks on e-commerce.

How to Resolve ‘Not enough permission to read files for backup’ with Magento Backupsuite Extension?

After you have installed Backupsuite extension in your Magento, sometimes it may happen that when you try to create a backup, Magento prompts you with an error message that reads “Not enough permission to read files for backup. Item does not exists”

The main reason behind this error is the file permission. All files that you backup must have ‘read’ permission. If the files that are selected in Magento Backupsuite extension do not have read permission then you may face this problem.

There are 2 solutions to overcome this problem –
1. You can directly apply read permission to root directory recursively.

2. Debug the files with wrong permission & apply them read permissions.

Here are the steps to debug the files with wrong permission –

Step 1 :
Enable logs from admin under System > Configuration > Advanced > Developer

Step 2 :
Copy – lib/Mage/Backup/Filesystem/Helper.php

into – app/code/local/Mage/Backup/Filesystem/Helper.php

(if you can’t find the target folders, you will have to create them)

Step 3 :
In the Helper.php find the following:

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

and change it to:

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

Step 4 :
Now re-run the system backup and check the folder /var/log/ for a file named backup_not_readable_files.log
In it you should find the specific files with the wrong permissions.

You can delete the copied Helper.php when debugging is done.