Failed To Create An Installation Directory

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 24

1

Failed to create an installation directory

Important Note: Before continuing with the methods below, to troubleshoot


the installation of Windows 10 Update v1903, perform the following actions
and then install the update:
1. Make sure you have enough free disk space (at least 32 GB).
2. Download and install the latest service stack update for Windows 10
version 1809.
3. Remove all external storage media, such as USB drives and SD cards.
Also, remove any USB connected device that you don't need. (e.g., USB
printer, USB wireless mouse or keyboard receiver, USB wireless network
card, etc.).
4) Temporarily disable or completely uninstall any antivirus or third-party
security program from your system.
5. If you have enabled Developer Mode on your system, proceed to disable
and uninstall Windows Developer Mode, until you install the update.
6. Disable drive encryption: If you have enabled device encryption on your
system (BitLocker, VeraCrypt), proceed and decrypt drive C: before
installing the update.
7. Try to troubleshoot Windows updates by running the Windows Update
Troubleshooter.
o do that, proceed as follows:
• Go to Start> Settings> Update and Security and> Troubleshoot> Windows
Update.
Now, the most common cause in Windows update problems is the
incomplete download of the update. In this case, you must delete the
Windows Update Store folder (C: \ Windows \ SoftwareDistribution) to force
Windows to download the update again.
To delete the Windows Update Storage folder:
1. Simultaneously press the Win + R keys to open the execution command
box.
2. Enter the following command and press OK.
• services.msc
3. In the list of services, in the right pane, look for the Windows update
service.
4. Right-click on the "Windows Update" service and select Stop.
5. Close the "Services" window.
* Note: If you cannot stop the Windows update service, then:
a. Double click on it to open its Properties.
Yes. Set the Startup Type to Disabled and click OK.
C. Restart your computer.
re. After rebooting, continue below.
2

6. Open Windows Explorer and navigate to the C: \ Windows folder.


7. Locate and then delete the SoftwareDistribution folder. * *
* Notes:
1. If you cannot delete the folder with the error "Folder in use, try again",
restart Windows in "Safe Mode" and repeat the procedure.
2. If you have disabled the Windows update service (Startup Type =
Disabled), go to services and set the Startup Type to Automatic.

8. Restart your computer.


3

Show hidden files, folders, and drives

1. Open temp user folder C:\users\"username"\AppData\Local\.

If you find no AppData folder under your computer name, do the following:


1) Inside the Windows File Explorer, choose View menu tab,
choose Options.
2) Choose View tab, check the option "Show hidden files, folders, and
drives" under "Hidden files and folders".

3) Choose OK to apply the change.


4

2.  Then right click on "temp" folder and choose "Properties" --> "Security"
--> Edit --> Add, and add the username you are using, then grant the user
all the rights. After that it'll work.

3.  If the error persists, reboot your computer and try to install again. This
should solve this problem.
5

Windows was unable to create a required installation


folder [SOLVED]

To fix various PC problems, we recommend DriverFix:


This software will keep your drivers up and running, thus keeping you safe
from common computer errors and hardware failure. Check all your drivers
now in 3 easy steps:

1. Download DriverFix (verified download file).


2. Click Start Scan to find all problematic drivers.
3. Click Update Drivers to get new versions and avoid system
malfunctionings.

 DriverFix has been downloaded by 523,511 readers this month.

System Update is an important task that should be done by all Windows


users on a regular basis. It is the best way to fix potential vulnerabilities in
your Windows OS.

You might have encountered an error that often appears during Windows
Updates and generally caused due to the lack of permissions of file or
registry. The full error message you get looks like “Error: 80070005 –
Windows was unable to create a required installation folder“. 

If you tend to ignore the error you might have to face system slow down or
even crashes. You can easily troubleshoot the issue through these simple
solutions. 

What to do if Windows was unable to create a required installation


folder

1. Allow user full control


2. Configure Windows Update Settings
3. Windows Update Troubleshooter
4. Reset the Permission Settings (Windows 7)

1. Allow user full control

Folder permissions might be the reason behind the error if it’s being caused
by a specific application.
6

You can follow the following steps to get rid of the error on your system.

1. Press Windows key + R to open the Run dialogue box.


2. Now type the following command and click OK.
o C:\Users\USERNAME\AppData

3. You need to replace USERNAME with the username of your account


and replace C: with the letter of your Windows installation drive. 
7

4. Find the Local folder right click on it and click Properties.


8

5. Navigate to Security > Edit > Add and then type Everyone in the


textbox provided below.

6. Click the Check names button that is available on the right side and


click OK.
9

7. Click Everyone and set its permissions to allow Full control.

8. Now just save the changes by clicking OK.


9. Finally, you have to restart the computer to apply the recent changes.

2. Configure Windows Update Settings

One of the easiest ways to fix the error is to allow automatic updates on


your system.  You can configure Windows Update settings by following these
steps.

1. Open the Start menu and type update in the search box.


2. You will see a list search results below, click Windows Update from
the list. It will open Windows Update in the Control Panel.
3. Now click Change Settings that on the left-hand side. 
4. You will be navigated to the Choose your Windows Update
Settings window. Head towards the Important updates section and
select Install updates automatically (recommended). 
10

5. You can also set a schedule to install these automatic updates by


clicking Updates will be automatically installed during the
maintenance window.
6. Finally hit the OK button to save the changes.

You might face the error if your Windows Firewall Settings are not
allowing Windows Update settings to take effect. You can adjust
the Windows Firewall Settings by following these steps:

1.  Click the Start menu and type Firewall in the search box.


2.  You will see a list of search results, select Windows Firewall from
the list.

3. On the left-hand side, you will find Allow a program or feature


through Windows Firewall click on it and select Allow another
11

program.
12

4. Next, click the Browse button and you have to locate


the svchost.exe file on the disk.

5. After locating the file click the following buttons Open > Add.


6. Now you will be able to see a new program in the list called Host
Process for Windows Services. 
7. Finally, save the changes by clicking the OK button.

3. Windows Update Troubleshooter

Windows Update Troubleshooter is a handy tool that helps to automatically


fix various issues while running Windows Updates. Microsoft offers
two separate versions for Windows 7 & 8 and Windows 10. You need to
download the version that is compatible with your PC. 

 Download Update Troubleshooter for Windows 10


 Download Update Troubleshooter for Windows 7 and Windows 8

You have to run the downloaded troubleshooter file in your PC. It will
automatically perform some fixes and finally, you will have to restart your
device. If required, you can again run the troubleshooter to fix some
additional issues.
13

4. Reset the Permission Settings (Windows 7)

This solution is specifically for those who are running a Windows 7 OS. This
tool is used to reset the Permission Settings on Windows machine. 

1. Download the subinacl.msi file on your Desktop and open the


downloaded file. 
2. Once the installation process starts you need to
select C:\Windows\System32 as the destination folder. 
3. Open Notepad by pressing Windows + R key on your keyboard and
typing notepad.

4. After pasting the following commands in your Notepad file and Save it


on your Desktop with the name reset.bat.
o @echo off
o subinacl /subkeyreg HKEY_LOCAL_MACHINE
/grant=administrators=f
o subinacl /subkeyreg HKEY_CURRENT_USER
/grant=administrators=f
o subinacl /subkeyreg HKEY_CLASSES_ROOT
/grant=administrators=f
o subinacl /subdirectories %SystemDrive%
/grant=administrators=f
o subinacl /subkeyreg HKEY_LOCAL_MACHINE /grant=system=f
o subinacl /subkeyreg HKEY_CURRENT_USER /grant=system=f
o subinacl /subkeyreg HKEY_CLASSES_ROOT /grant=system=f
o subinacl /subdirectories %SystemDrive% /grant=system=f
o @Echo =========================
o @Echo Finished.
o @Echo =========================
o @pause
14

5. Now head to the Desktop,  right-click the reset.bat and select Run as


administrator.
6. It will open a window processing similar to the DOS.
7. You will wait to wait for a few mins until you see the following
message Finished, press any key to continue. 

If the issue is not resolved yet you need to use the Built-in


Administrator to run the upgrade.

1. Navigate to Start button and locate Command Prompt.


2. You have to right-click the Command Prompt, select Run as
administrator and click Continue. 
3. Press the Enter key after pasting the following command net user
administrator /active:yes.
4. Now login to the Administrator Account by restarting your system.
5. Finally, run Windows 7 Upgrade and it is expected to
successfully run without any issues. 

If the error still persists, you need to disable your antivirus program for a
specified time period. By the end of this post, you must have resolved
“Error: 80070005 – Windows was unable to create a required
installation folder” by correctly following each step. Let us know in the
comments section below if you still face any issues. 
15

How to reset File & Folder permissions to default in


Windows 10

In Windows, you no need to worry about the file and folder Permission,
because by default windows will automatically set its own permissions, that
prevent unauthorized access to files and folders. Permissions can be broken
down into Access Control Lists with users and their corresponding rights.
Normally in windows, every file or folder gets their permissions from the
parent folder. There are basically six types of permissions in Windows Full
Control, Modify, Read & Execute, List Folder Contents, Read,
and Write. List Folder Contents is the only permission that is exclusive to
folders. You can set your own set of permissions to any files or folders. If
you set a lot of Permissions to any file or folder and unable to reset it back,
then this article will guide you to Reset File and Folder Permission to default.

Reset File and Folder Permission to default:


You can reset file and folder Permissions simply by running a command-line
program. We are going to use icacls and Secedit command, before
proceeding create a system restore point. In case if it goes wrong you can
restore it.

Using icacls command:


iCACLS command allows displaying or changing an Access Control Lists for
files and folders on the Windows file system. Windows uses the ACL to
configure permissions for all files and folders. Icacls is a command-line utility
that can modify the files and folders permissions. To reset the Permissions
use the following iCACLS command.

Open Command Prompt in elevated mode. Then run the following command.

icacls * /t /q /c /reset
16

Here /T Indicates that this operation is performed on all matching


files/directories below the directories specified in the name. /Q indicates
that icacls should suppress success messages. /C Indicates that this
operation continues on all file errors. Error messages are still be shown.
Once done you can save the Permissions to a file then you can use it later if
you need it for other computers.

Using Secedit command:


Secedit command configures and analyses system security by comparing
your current security configuration against specified security templates..

Open Command Prompt in elevated mode and run the following command
and hit enter.

secedit /configure /cfg %windir%\inf\defltbase.inf /db


defltbase.sdb /verbose secedit /configure  
Allows you to configure a system with security settings stored in a
database. 
17

How to fix “installation failed, could not create directory

The “Installation failed, could not create directory.” error message is a


relatively standard error message that many WordPress users get. It often
occurs when users try to use a new version of WordPress, try to upgrade
WordPress plugins, or add and update themes. Why does it happen and how
do you fix it?

This  happens due to an error during installation. The message tells us the
installation was not successful due to WordPress being unable to create a
new directory. Hence, we get the error message “Installation failed, could
not create directory.”. It essentially means that the user might have missed
a crucial step during installation.

Luckily, there are some things that you can do to fix the issue. You must
know that when WordPress creates a new website, your files are stored in
folders or directories, which the webserver creates. These folders can only
be accessed if you give WordPress permission to do so; failure to do so
might result in various error messages, such as the “Installation failed, could
not create directory.”, or the “Failed to write to disk.” error message.

The error also happens if you exceed the quota limit of your server, or if the
directory you are trying to reach is already full.
18

Learn below more about this topic in this article created by our team
at WPDatatables.

The Web Server Must Own the Directories


The first step to getting rid of this error message is to ensure that your web
server owns the directories where WordPress is installed.

To do this, you will have to enter some lines of code. The first line of code is
used to access your username if you don’t know it.

# ps aux | egrep '(apache|httpd)'

This code will list all processes that are running, with the names of the user
in the brackets. The next step would be to allow WordPress access(or
ownership) of all the directories where WordPress is installed.

# chown -R apache /var/www/html/


19

Option 1: Update Folder Permissions With cPanel

The permissions for folder usage depends on the rights that each user has.
Within the web hosting server, each server will have permission to read,
write and execute. These will depend on the permission levels based on user
permissions.

For this option to work for you, you will need cPanel access and internet
connection. Here are the steps that you should follow.

 Login to your cPanel account.


 Once logged in, search for “file manager” and open the first search
option.
 To view files of your website, open “public.html.”
 Select all files under the root directory, right-click, and open “file
permissions.”
20

 Under the “permissions” button at the top of the page, click on the
“change permissions” option.
 Then, a dialog box will open. Under the numeric value field, enter the
number “755”. Next, check the “Recurse into subdirectories.” checkbox and
select the “Apply to directories only.” option. Click on OK and wait for the
FTP client to finish the process. It might take some time.
21

NOTE: The 755 setting means the following things:

 Read, write and execute for the owner, which can be you or anyone
who logs in with your name.
 Read and execute options for groups (mostly applicable to Linux,
where users are organized in groups)
 Read and execute permissions for the rest of the users (for example,
readers of your website).
22

7. The next step after the process is done, is to select all files under the
root directory again and right-click, select “File permissions.”, and a dialog
box will pop up.
8. This time you will have to enter the number “644” under the numeric
value field. Click on “Recurse into subdirectories.”, and select “Apply to files
only.”
9. Confirm the changes.
10. Clear browser cache and try to install a plugin or a theme. Now, the
“Installation failed, could not create directory.” error message should not
occur again, and you should be able to install plugins and themes going
forward.

Option 2: Configure FTP Permissions In The “wp-config.php” File

Another way to get rid of this error message, if the first option was
unsuccessful, is to try to change the FTP permissions by configuring the “wp-
config.php” file.

This option can fix the error message, as your server might not have
permission to write new files. This is why the operation fails each time, and
you can change it by configuring the “wp-config.php” file.

This process is quite simple. Here are the steps to fix the “Installation failed,
could not create directory.” error.
23

1. From your web hosting account, open the “File Manager”.


2. Within the root folder, locate the “wp-config.php” file and open it.
3. In your “wp-config.php” file, enter the following passage of code.

NOTE: Replace the information in brackets with your information.

define(‘FS_METHOD’, ‘ftpext’);

define(‘FTP_BASE’, ‘/pathtorootofyourblog/’);

define(‘FTP_USER’, ‘ftpusername’);

define(‘FTP_PASS’, ‘ftppassword’);

define(‘FTP_HOST’, ‘yoursite.com’);

define(‘FTP_SSL’, false);

4. Save the “wp-config.php” file.


5. Return to your dashboard and try to install the plugin or upgrade once
again. This time, it should be done without any problems.

Other Possible Fixes


Although it seems unlikely, the error “Installation failed, could not create
directory.” might be caused by insufficient disk space in your server. It is a
common issue if you are using shared hosting.
24

Ensure you have enough space for the new files to be installed. Also, you
should not store your backups in the same folder as your server, as you are
risking your reserves with this method. Instead, use a cloud backup service
like Dropbox.

Having sufficient disk space is the first prerequisite for new files to be
installed. Given that disk sizes are bigger nowadays, this issue is often
ignored. It will be an issue if, however, your disk space is small. You can
check it as another option if the previous ones haven’t worked.

You might also like