buy viagra
Home » Joomla!, Windows

"JFolder::create: Could not create directory" error in Joomla 1.5.* on IIS.

22 July 2009 2 Comments

Problem

When trying to add a Plugin, Component or Module in Joomla’s Extension Manager, you might get the following error:

JFolder::create: Could not create directory
Warning! Failed to move file.

Shown here:

Error showing in extension manager

This is likely – but not definitely – to be after the site has been moved from location to another, a change of directory, or server.

Solution

When a Component, Plugin or Module is added, the Joomla system attempts to copy the installable zip to a temporary directory, called ‘tmp‘. From there, PHP extracts the files and installs them. The error above usually occurs for one or more of the following reasons (in order of likelihood):

The path to the ‘tmp’ directory is wrong in the Joomla configuration file

In the Joomla installation root, find the file called ‘configuration.php’. In this file there should be a line with that says something like:

var $tmp_path = ‘C:\\path\\to\\your\\cms\\tmp’;

A masked live example is shown here:

Correct path to tmp directory

Check that this path is correct, and that the ‘tmp’ directory truly does sit in that location. In this example, the directory would need to be here: d:\clients\sites\[my client]\tmp.

The temporary exists, but is not ‘writable’

If the ‘tmp’ directory has the wrong permissions, the web service won’t be able to copy the installer files to it. To check/correct this you will need  access to the server physically, or via a remote admin method like RDP (terminal services), VNC or similar.

Find the ‘tmp’ directory in the web root, and view the permissions. The IIS Guest account, called ‘IUSR_[machinename]‘, needs to be given ‘modify’ privileges. Example shown below:

giving IUSR account modify permissions

The temporary directory doesn’t exist

To check this, navigate to your web root (often wwwroot) and check that a directory called ‘tmp‘ exists. This directory should have been created when the Joomla was installed, but it’s conceivable that it might have been deleted… maybe? If it doesn’t exist, create it, and make sure its ‘writable’ (see previous step).

If none of this works, or you spot a mistake,  post a comment.

2 Comments »

  • Ben Francis said:

    I have found this problem is often to do with ownership of the files on a linux server.
    an easy solution I have found is to login using SSH and chown all the files in the installation to owner apache:apache, this seems to solve all the problems.

  • Ken said:

    Very nice tip.

    This was precisely my situation, having ported from one server to another, and I had /home2 in the tmp path, whereas the new server uses /home.

    Also, the word FIX in your title, made it easy to pick out this page in the Google results.

    Kudos!

Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.