Support

Documentation

Warnings about unreadable files and directories backing up a site with Akeeba Backup

When this problem occurs, you get a list of warnings during backup stating "Unreadable file /some/file; check permissions" or "Unreadable directory /some/directory; check permissions". This means that when Akeeba Backup asked PHP to list the contents of the directory or read the contents of the file, PHP replied that this was impossible. Here we will attempt to find out why and fix it.

DOUBLE CHECK A BACKUP IF SUCH WARNINGS APPEAR! These warnings mean that files or whole directories have not been backed up. It is very likely that some overly important files of your site (or even all of the files of your site!) did not make it into the archive. This will cause the restored site to be broken. That's why we call them warnings: they warn you that something may be broken so that you can investigate and make sure you fix it - or be 100% that you can safely ignore them.

Unreadable directories

A directory becomes unreadable because of its permissions. Please note that some directories are supposed to be unreadable. For example, on a live host, it is common to have directories such as cgi-bin, awstats, etc which are not part of your CMS / PHP script powering your site and are there to provide some service offered by your host. If you are not sure, ask your host about that. These directories MUST NOT be backed up, or restoration will be impossible. If one of those directories appears as an unwritable directory, please go to Akeeba Backup, click on Files and Directories Exclusion and exclude those directories from the backup (the leftmost icon next to the folder's name must be yellow).

If you get that kind of warning for <root>, it means that your site's root is not readable. This will cause Akeeba Backup to be unable to backup your site. In this case, using your favourite FTP application, connect to your site and look for your site's web root. It is usually a directory named public_html, httpdocs, htdocs, www or something like that. If unsure, ask your host. Change its permissions to 0755. If you can not do that yourself, ask your host to do that for you. If they refuse on the grounds of security, explain to them that a. it is necessary to backup your site and b. they are probably doing something wrong if other users are allowed to browse your site's files (and swiftly change to a more secure host!).

If you are on a Windows server, there is no notion of permissions. Instead, you have to edit the Windows ACLs to allow PHP to be able to list the contents of your site's directories. Since this procedure is highly dependent on the server setup, please ask your host to do it for you. If you are on a local server, please read on.

If you are on a Linux machine, change the permissions of the root of your website to 0755. For example, if you're trying to restore to /var/www/mysite you have to issue a command like chmod -Rf 0755 /var/www/mysite

If you are on a Mac OS X machine, use the Finder to find your site's root. Right-click or Control-click on it and select Get Info. Scroll down to the Sharing & Permissions slider and expand it if it's not already expanded. Find the row where the Name column reads everyone and set the Privilege to Read & Write.

If you are on a Windows XP Home machine, use Windows explorer to find your site's root. Right click on it, select Properties and clear (unselect - it must be blank, not gray!) the Read Only checkbox. Click OK and, if prompted, tell Windows to apply this to all files and subdirectories.

If you are on a Windows XP Professional, Vista (all versions) or 7 (all versions) machine, use Windows explorer to find your site's root. Right click on it, select Properties and click on the Security tab. Click on the Edit... button. If you can't see a user named Everyone, you will have to click on the Add... button, type Everyone in the big text box and click OK. Now click on the Everyone user and then take a look at the list of checkboxes below. Click the Accept checkbox on the Full Control row (the topmost one). Click on OK, then again on OK.

The same instructions apply for any other directory which may appear to be unwritable. Instead of your site's root, do this procedure to the directory which appears unwritable.

Unreadable files

Unreadable files are not accessible by PHP for reading. The fact that you can access them with FTP or that you can view them in your browser DOES NOT mean that they are readable by PHP. This is a common misconception. If you feel that this can't be true, please read this first (make sure you click on all the Next links on the bottom to read through the entire chapter). We are not responsible about how your web server and UNIX-based Operating Systems work, but we can help work around the problem!

All you have to do is to find the file referenced by the warning message and give it 0644 permissions (read & write for the user, read only for the group and everyone). That's all there is to it.

Please note that some files (e.g. .ftpquota on your site's root) are not supposed to be readable. These are special files that do not belong to your CMS / PHP script powering your site installation and are put on your site by your host. These files must not be backed up, otherwise restoration will fail. Go to Akeeba Backup and click on Files and Directories Exclusion to find those files and remove them from the backup. If you are unsure whether a file is put in there by your host, or your CMS / PHP script (or one of its extensions) please ask your host. If it is a file put there by the host, exclude it. If it is not, change its permissions to 0644.