“You are not authorized to access this attachment.” Error on Mosets Tree

A client emailed us this morning and told us that after his website was migrated to Joomla 2.5, he was seeing the below error whenever he tried to download an attachment in Mosets Tree:

You are not authorized to access this attachment.

So, we started debugging Mosets Tree in order to trace the source of the problem, and, after some time, we discovered that the above error was misleading: it wasn’t about user permissions, it was just that the file to download was not physically where it should be. For those who don’t know, Mosets Tree doesn’t use a top level folder to store its files, instead, it stores them under its own component folder (in fact, the files [or so-called attachments] are stored under the /components/com_mtree/attachments/ directory).

So, what did we do to fix the problem?

Well, it was quite easy! Thankfully, our client had a backup of his old website and so we copied the files from the old website to the new, migrated website. There are several ways to do that, but the best (and fastest one) is to use Linux’s shell to do that. Here’s how it can be done (assuming you have shell access to the server):

  • Login to shell through Putty
  • Issue the following command (will only work if your website is running under WHM – Plesk websites do not have the same directory structure):

    cp -R /home/[your-website-user]/oldwebsite/components/com_mtree/attachments /home/[your-website-user]/public_html/components/com_mtree/

  • That’s it!

If you have cPanel and you don’t have access to the shell, then all you need to do is to login to cPanel, go to the File Manager, and then right click on the attachments folder under the old website and then click on Copy (you will be able to specify the destination directory in the popup box).

Now, if you have the same problem but the above guide is a bit over your head, then why not contact us? We can fix the problem for you in no time (assuming your old files are still there) and we won’t charge you much. Be informed, though, that this error doesn’t always mean that the file is not there. In this case, our work might take a bit more time! Rest assured though – you are always in good hands and we’ll always find a solution (as long as your data is still there)!

No comments yet.

Leave a comment