Ошибка file access denied for

Windows 8 Enterprise Windows 8 Pro Windows 8 Windows 7 Enterprise Windows 7 Professional Windows 7 Ultimate Windows 7 Home Premium Windows 7 Home Basic Windows 7 Starter Windows Vista Enterprise Windows Vista Ultimate Windows Vista Business Windows Vista Home Premium Windows Vista Home Basic Windows Vista Starter Microsoft Windows XP Professional Microsoft Windows XP Home Edition Microsoft Windows XP Starter Edition More…Less

Summary

When you try to access or work with files and folders in Windows, you experience one or more of the following issues:

  • Issue 1: You receive an «Access Denied» error message or a similar message.

  • Issue 2: You cannot access, change, save, or delete files and folders.

  • Issue 3: You cannot open a file or folder after you install a new version of Windows.

Resolution

To resolve a particular issue, follow the steps for the issue that best describes your situation. Use the method for your version of Windows.

Note You may not always receive an “Access Denied” error message for these kinds of issues. If particular steps do not resolve the issue, try a different set of steps.

Cause
An «Access Denied» error message can occur for one or more of the following reasons:

  • The folder ownership has changed.

  • You do not have the appropriate permissions.

  • The file is encrypted.

Resolution

Windows 8

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 8 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files or folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or folder, follow these steps:

  1. Press and hold the folder that you want to take ownership of, then tap Properties. (If you are using a mouse, right-click the folder, and then click Properties.)

  2. Tap or click the Security tab, tap or click Advanced, then tap or click Change. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  3. Type the name of the person that you want to give ownership to, and then click Check Names.

    Note The account name for the person that you are assigning ownership to is displayed.

  4. Click OK.

  5. If you want this person to be the owner of the files and subfolders that are contained in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You may not have the appropriate permissions
Issues that you experience when you try to access files and folders may be related to permissions. Permissions are rules that determine whether you can access or change files and folders. To check permissions on a file or folder, follow these steps:

  1. Press and hold or right-click the file or folder, and then click Properties.

  2. Tap or click the Security tab.

  3. Under Group or user names, tap or click your name to see the permissions that you have.

To open a file, you have to have the Read permission. To change the permissions of a file or folder, follow these steps.

Important You must be logged on as an administrator to change permissions on files and folders.

  1. Press and hold or right-click the file or folder, and then tap or click Properties.

  2. Tap or click the Security tab.

  3. Under Group or user names, tap or click your name to see the permissions that you have.

  4. Tap or click Edit, tap or click your name, select the check boxes for the permissions that you must have, and then click OK.

The file or folder may be encrypted
Encryption can help protect files and folders from unwanted access. You cannot open an encrypted file or folder without the certificate that was used to encrypt it. To determine whether a file or folder is encrypted, follow these steps:

  1. Press and hold or right-click the file or folder, and then tap or click Properties.

  2. Tap or click the General tab, and then tap or click Advanced.

If the Encrypt contents to secure data check box is selected, you have to have the certificate that was used to encrypt the file or folder to be able to open it. In this situation, you should obtain the certificate from the person who created or encrypted the file or folder, or have that person decrypt the file or folder.

Windows 7

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 7 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files or folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or a folder, follow these steps:

  1. Right-click the folder that you want to take ownership of, then click Properties.

  2. Click the Security tab, click Advanced, then click the Owner tab.

  3. Click Edit.

    Note If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  4. Click the name of the person that you want to give ownership to.

  5. If you want this person to be the owner of files and subfolders in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You may not have the appropriate permissions
Issues that you experience when you try to access files and folders may be related to permissions. Permissions are rules that determine whether you can access or change files and folders. To determine the permissions of the file or folder, follow these steps:

  1. Right-click the file or folder, then click Properties.

  2. Click the Security tab.

  3. Under Group or user names, click your name to see the permissions that you have.

To open a file, you have to have the Read permission. To change permissions on a file or folder, follow these steps.

Important You must be logged on as an administrator to change permissions on files and folders.

  1. Right-click the file or folder, and then click Properties.

  2. Click the Security tab.

  3. Under Group or user names, click your name to see the permissions that you have.

  4. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.

For more information about permissions, see What are permissions?.

The file or folder may be encrypted
Encryption can help protect files and folders from unwanted access. You cannot open an encrypted file or folder without the certificate that was used to encrypt it. To determine whether a file or folder is encrypted, follow these steps:

  1. Right-click the file or folder, and then click Properties.

  2. Click the General tab, then click Advanced.

If the Encrypt contents to secure data check box is selected, you have to have the certificate that was used to encrypt the file or folder to be able to open it.

You should obtain the certificate from the person who created or encrypted the file or folder, or have that person decrypt the file or folder.

For more information, see Import or export certificates and private keys.

Cause
A problem that prevents you from accessing or working with files and folders can occur for one or more of the following reasons:

  • The folder ownership has changed

  • You do not have the appropriate permissions

  • The file is encrypted

  • The file is corrupted

  • The user profile is corrupted

Resolution

Windows 8

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 8 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files or folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or folder, follow these steps:

  1. Press and hold the folder that you want to take ownership of, then tap Properties. (If you are using a mouse, right-click the folder, and then click Properties.)

  2. Tap or click the Security tab, tap or click Advanced, then tap or click Change. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  3. Type the name of the person that you want to give ownership to, and then click Check Names.

    Note The account name for the person that you are assigning ownership to is displayed.

  4. Click OK.

  5. If you want this person to be the owner of the files and subfolders that are contained in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You may not have the appropriate permissions
Issues that you experience when you try to access files and folders may be related to permissions. Permissions are rules that determine whether you can access or change files and folders. To check permissions on a file or a folder, follow these steps:

  1. Press and hold or right-click the file or folder, and then click Properties.

  2. Tap or click the Security tab.

  3. Under Group or user names, tap or click your name to see the permissions that you have.

To open a file, you have to have the Read permission. To change the permissions of a file or folder, follow these steps.

Important You must be logged on as an administrator to change permissions on files and folders.

  1. Press and hold or right-click the file or folder, and then tap or click Properties.

  2. Tap or click the Security tab.

  3. Under Group or user names, tap or click your name to see the permissions that you have.

  4. Tap or click Edit, tap or click your name, select the check boxes for the permissions that you must have, and then click OK.

For more information about permissions, see What are permissions?.

The file or folder may be encrypted
Encryption can help protect files and folders from unwanted access. You cannot open an encrypted file or folder without the certificate that was used to encrypt it. To determine whether a file or folder is encrypted, follow these steps:

  1. Press and hold or right-click the file or folder, and then tap or click Properties.

  2. Tap or click the General tab, and then tap or click Advanced.

If the Encrypt contents to secure data check box is selected, you have to have the certificate that was used to encrypt the file or folder to be able to open it. In this situation, you should obtain the certificate from the person who created or encrypted the file or folder, or have that person decrypt the file or folder.

The file or folder may be corrupted
Files can become corrupted for several reasons. The most common reason is that you have a file open when your computer crashes or loses power. Most corrupted files cannot be repaired. In this situation, you should either delete the file or restore the file from a backup copy.

For more information about corrupted files and how to fix them, see Corrupted files: frequently asked questions.

Your local user profile may be corrupted
Occasionally, Windows might not read your local user profile correctly. This may prevent you from accessing files and folders. In this situation, you may have to use a new local user profile. To create the profile, you must first create a local user account. When the new account is created, the profile is also created. To create a local user account, follow these steps:

  1. Swipe from the right edge of the screen, tap Settings, and then tap Change PC settings. (If you are using a mouse, point to the upper-right corner of the screen, move the mouse pointer down, click Settings, and then click Change PC settings)

  2. In the navigation pane, tap or click Users.

  3. Tap or Click Add a User, then tap or click Can they sign in without a Microsoft account?

  4. Tap or click Local account.

  5. Enter your new account name.

  6. If you want to use a password, enter and verify the password that you want to use. If you decide not to use a password, tap or click Next without entering a password.

  7. Tap or click Finish.

Windows 7

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 7 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files or folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or a folder, follow these steps:

  1. Right-click the folder that you want to take ownership of, and then click Properties.

  2. Click the Security tab, click Advanced, and then click the Owner tab.

  3. Click Edit. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  4. Click the name of the person that you want to give ownership to.

  5. If you want that person to be the owner of files and subfolders in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You may not have the appropriate permissions
Issues that you experience when you try to access files and folders may be related to permissions. Permissions are rules that determine whether you can access or change files and folders. To check permissions on a file or a folder, follow these steps:

  1. Press and hold or right-click the file or folder, and then click Properties.

  2. Tap or click the Security tab.

  3. Under Group or user names, tap or click your name to see the permissions that you have.

To open a file, you have to have the Read permission. To change permissions on a file or folder, follow these steps.

Important You must be logged on as an administrator to change permissions on files and folders.

  1. Right-click the file or folder, and then click Properties.

  2. Click the Security tab.

  3. Under Group or user names, click your name to see the permissions you have.

  4. Click Edit, click your name, select the check boxes for the permissions that you must have, and then click OK.

For more information about permissions, see What are permissions?.

The file or folder may be encrypted
Encryption can help protect files and folders from unwanted access. You cannot open an encrypted file or folder without the certificate that was used to encrypt it. To determine whether a file or folder is encrypted, follow these steps:

  1. Right-click the file, then click Properties.

  2. Click the General tab, and then click Advanced.

If the Encrypt contents to secure data check box is selected, you have to have the certificate that was used to encrypt the file or folder to be able to open it.

You should obtain the certificate from the person who created the file. For more information, see Import or export certificates and private keys.

The file or folder may be corrupted
Files can become corrupted for several reasons. The most common reason is that you have a file open when your computer crashes or loses power. Most corrupted files cannot be repaired. In this situation, you should either delete the file or restore the file from a backup copy.

For more information about corrupted files and how to fix them, see Corrupted files: frequently asked questions.

Your user profile may be corrupted
Occasionally, Windows might not read your local user profile correctly. This may prevent you from accessing files and folders. In this situation, you may have to use a new local user profile. To create the profile, you must first create a local user account. When the new account is created, the profile is also created.

For more information about how to create user profiles, see Fix a corrupted user profile. After the new user profile is created, you can copy your existing user files to the new profile so that you can access them.

Cause
Problems that prevent you from accessing files and folders after you upgrade to a new version of Windows can occur for one or more of the following reasons:

  • The folder ownership has changed.

  • The files are being stored in a Windows.old folder from your previous system.

Resolution

Windows 8

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 8 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files and folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or a folder, follow these steps:

  1. Press and hold the folder that you want to take ownership of, then tap Properties. (If you are using a mouse, right-click the folder, and then click Properties.)

  2. Tap or click the Security tab, tap or click Advanced, then tap or click Change. If you are prompted for an administrator password or for confirmation, type the password or provide confirmation.

  3. Type the name of the person that you want to give ownership to, and then click Check Names.

    Note The account name for the person that you are assigning ownership to is displayed.

  4. Click OK.

  5. If you want this person to be the owner of the files and subfolders that are contained in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You have to recover files from the Windows.old folder
If you recently upgraded your computer to Windows 8 from an earlier version of Windows, and you did not reformat the hard disk, you might still be able to access your old files from the Windows.old folder.

To fix this problem automatically, click the Fix it button or link. In the File Download dialog box, click Run, and then follow the steps in the Fix it Wizard. If you prefer to fix this problem yourself, go to the «Let me fix it myself» section.

Fix it for me

Notes

  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.

  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD, and then run it on the computer that has the problem.

Let me fix it myself
To manually retrieve the files, follow these steps:

  1. Open the desktop, tap the folder icon, and then click Computer. Or, press the Windows logo key+E.

  2. Double-tap or double-click the drive that Windows is installed on (typically, drive C).

  3. Double-tap or double-click the Windows.old folder.

  4. Double-tap or double-click the Users folder.

  5. Double-tap or double-click your user name.

  6. Open the folders that contain the files that you want to retrieve. For example, to retrieve files in the Documents folder, double-tap or double-click Documents.

  7. Copy the files that you want from each folder and paste them to a folder in Windows 8. For example, if you want to retrieve everything from the Documents folder, copy all the files and folders from the Documents folder in the Windows.old folder, and then paste them to the Documents library in Windows 8.

  8. Repeat steps 5-7 for each user account on your computer.

For more information about how to recover data from an earlier version of Windows, see Recover lost or deleted files.

Windows 7

You may not have ownership of a file or folder
If you recently upgraded your computer to Windows 7 from an earlier version of Windows, some of your account information may have changed. Therefore, you may no longer have ownership of some files and folders. You might be able to resolve this issue by restoring your ownership of the files and folders.

To take ownership of a file or a folder, follow these steps:

  1. Right-click the folder that you want to take ownership of, and then click Properties.

  2. Click the Security tab, click Advanced, and then click the Owner tab.

  3. Click Edit. If you are prompted for an administrator password or confirmation, type the password or provide confirmation.

  4. Click the name of the person that you want to give ownership to.

  5. If you want that person to be the owner of files and subfolders in this folder, select the Replace owner on subcontainers and objects check box.

  6. Click OK.

You may have to recover files from the Windows.old folder
If you recently upgraded your computer to Windows 7 from an earlier version of Windows, and you did not reformat your hard disk, you might still be able to access your old files from the Windows.old folder.

To fix this problem automatically, click the Fix it button or link. In the File Download dialog box, click Run, and then follow the steps in the Fix it Wizard.If you prefer to fix this problem yourself, go to the «Let me fix it myself» section.

Fix it for me

Notes

  • This wizard may be in English only. However, the automatic fix also works for other language versions of Windows.

  • If you are not on the computer that has the problem, save the Fix it solution to a flash drive or a CD, and then run it on the computer that has the problem.

Let me fix it myself
To manually retrieve the files, follow these steps:

  1. Click Start, then click Computer.

  2. Double-click the drive that Windows is installed on (typically, drive C).

  3. Double-click the Windows.old folder.

  4. Double-click the Users folder.

  5. Double-click your user name.

  6. Open the folders that contain the files that you want to retrieve. For example, to retrieve files in the Documents folder, double-click Documents.

  7. Copy the files that you want from each folder and paste them to a folder in Windows 7. For example, if you want to retrieve everything from the Documents folder, copy all the files and folders from the Documents folder in the Windows.old folder, and then paste them to the Documents library in Windows 7.

  8. Repeat steps 5-7 for each user account on your computer.

For more information about how to recover data from an earlier version of Windows, see Recover lost or deleted files.
 

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Are you getting the access denied error while accessing a specific file or folder? There can be many reasons for it. We are covering the solutions for the following issues:

  • Did you receive an ‘Access Denied’ error message? Or something similar?
  • Check if you can’t access or make changes to the file. This goes for deleting the file and folder, as well.
  • You can’t seem to access the file after updating. This could also be after you install a new operating system version. For example, updating from Windows 8 to 10 and so on.

This article is your ultimate stop to fixing the Windows Access Denied Error. Whether for Windows 7, Windows 8, or Windows 10, you will find the solutions. More importantly, we have attempted to compile any other problem, as well.

Over 22 solutions are waiting for you to fix the Access Denied Error. So without further ado, let’s begin! 

Solutions For ‘Access Denied’ Error In Windows 10, 8 Or 7

  1. Login As Administrator
  2. Change The Ownership
  3. Change Folder Permissions
  4. Check For Encryption
  5. Add The Account To Admin Group
  6. Enable The Admin Account To Access File Or Folder
  7. OneDrive Access Denied Issue Fix 
  8. Google Drive Access Denied Issue Fix
  9. Change Your Account To Administrator Account
  10. Edit The Registry
  11. User Account Control To Install An Application
  12. Change The Permissions Of Temp And Installer Folders 
  13. Access Denied For Zipped Folders 
  14. Access Denied Error For Command Prompt
  15. Access Denied Errors In Hard Drive
  16. External Hard Drive Access Denied Error
  17. Windows Access Denied For Notepad And Other Applications
  18. Fix Automatic Startup Apps
  19. Check The Antivirus Settings 
  20. USB Drives Blocked Access Denied 
  21. Delete The Desktop.Ini File 
  22. Uninstall The Third-Party Device Manager (HP)

Fix Access Denied Error For Files And Folders 

The access denied error for a file or folder appears due to the lack of permission. You might not have apt permissions or ownership of the folders and files. You can try the steps given below. But remember, if none of these work, the file might be encrypted. 

An encrypted file can only be accessed by the person who has the encryption certificate. No one else can access it. So, in that case, you can’t do much: 

1. Login As Administrator

Access denied - Login as admin

If you’re getting access denied messages to open or edit a file, you need Admin permission. You can fix this by logging into an Admin account or opening the file as an Administrator. You will need to get the permissions if you’re not the Admin. Often, logging in with Admin credentials will do the job.

Often, if the PC is shared among many users, it will need Admin permission if one user wants to access other files. This also goes for system files, program files and other similar essential files.

2. Change The Ownership

Change The Ownership

This fix works for the folder access denied error. If you take ownership through File Explorer, you can access it:

  • Right-click on the File or Folder you want the ownership of.
  • Then go to the properties and go to the Security Tab.
  • Click on the Advanced button in the tab.
  • A new window will open up. See the owner at the top.
  • It might show you the ‘Unable to display current owner’ message.
  • There should be a blue link button ‘Change.’ Click on it.
  • This would prompt you for Admin permission and log-in details if you didn’t log in as Admin.
  • Now, click on ‘Select User or Group.’ Now, you will have to type the Account name for the new owner. Ensure the account’s name is on your PC if it is a shared PC.
  • There might be an option to assign it to Admins or Users.
  • Once you type the username, click on Check Names. This will scan the system for existing usernames. Click OK.
  • Now, return to the Advanced option in the Security Tab. You will find the ‘Replace all child object permission entries’ option. Check this box and press OK.

Do you not know the username for your account because you use Microsoft Account (online)? It is the first five characters of your username.

A security advisory is not to assign ownership of essential files and folders to users. This goes for program files, system files, and other critical files. Try to keep their permission limited to Admin. Otherwise, you can risk potential security leaks.

You might have to manually assign the permission if the above-given steps didn’t work:

advanced properties settings computer click menu solution
  • Go to the Advanced Security Settings. You will find this in the System Properties. Often, it is known as ‘View Advanced Security’ or something similar.
  • Check the list of users. Now, check if your account is on the list. If it isn’t on the list, click on the Add button.
  • Now, click on ‘Select A Principal.’
  • Enter the account name, check names and then click OK.
  • Now you will have to follow through with the above-given steps.

You can also use the command prompt. For this, you will have to run the command prompt as Administrator. Then type these:

  • takeown / f “Folder directory here” / r / d  y
  • icacls “folder directory here” / grant Administrators: F / T

You must replace the ‘folder directory here’ with the actual directory. If you can’t find the directory, drag and drop the folder in the command line. It often automatically creates the directory for your command.

3. Change Folder Permissions

Change Folder Permissions

Sometimes, the above-given step won’t work. For Admins, it is an easy task. But, what if you want to permit someone else to avoid access denied error? Reviewing the permissions of the folder or file would be ideal.

  • Once again, right-click the file or folder.
  • Go to the properties and Security tab.
  • Once again, you will see the list of users and groups.
  • When you click each user or group, you will see their permissions.
  • Click on the Edit button to change the permissions. You can only do this as the Admin.
  • Now you can select permissions like Full Control or Read and so on.

Full Control gives the user complete control over the folder and files. The read will only allow others to see what is in the folder.

4. Check For Encryption

Check For Encryption

If nothing has worked so far, check for the encryption. As mentioned above, you won’t access encrypted files without a password. But, you can still check if it is encrypted or not:

  • Go to the Properties of the File or Folder you’re trying to access.
  • Then go to the General Tab and click on the ‘Advanced’ button.
  • See if ‘Encrypt contents to secure data’ is checked. If it is, you will have to find the person who did it.

5. Add The Account To Admin Group

Add The Account To Admin Group

22 Fixes For «Access Denied» Error In Windows 1

Often, the access denied error appears because your account doesn’t have Admin permissions. You can give your account Administrator privileges easily. All you need to do is follow these steps:

  • Press Windows + X key or Right-click on the Start Menu. Select ‘Computer Management’ from the options.
  • Go to the Local Users And Groups in the computer management window.
  • Then go to users and double-click your account. It should be on the left panel.
  • Find the ‘Members of’ tab and click on the Add button.
  • There will be a ‘Enter the object names to select field’ section.
  • Type Administrators in that area. Click on Check Namesadministrator. Let the process go through and click OK.
  • Now, select Administrators and click Apply. Then OK to save changes.
  • Restart your PC

6. Enable The Admin Account To Access File Or Folder 

Even if you have a single account on Windows 10, you might not have Admin permissions. It happens because Windows 10 has a default built-in Admin account. This exists in your pre-existing account. But, to access it, you will have to follow these steps:

  • Once again, press Windows Key + X. Select Command Prompt (Admin) from the options.
  • Type: net user Administrator / active: yes. Then press enter.
  • This should unlock the Admin account for you. Now, you will have to log out of your current account.
  • Then select the Admin account from the login menu.
  • Now you can access files and folders you wish to access.

But remember, once you’re done, you might want to disable the Admin account. Otherwise, any other person could access it. Go back to your primary account and launch the command prompt (Admin) again.

This time type: net user administrator / active: no. And press enter.

7. OneDrive Access Denied Issue

OneDrive Access Denied Issue

Maybe the problem isn’t in your account’s file or folder. It could be the OneDrive preventing access. You can try these steps:

  • Find One Drive in the Taskbar at the bottom right corner of your Windows.
  • Right-click on it and select Settings from the options.
  • Find the AutoSave or backup tab and check the Documents and Pictures. Select the ‘This PC only’ option for the two.
  • Click OK.

See if you can access the OneDrive files and folders now. If you still can’t, you can use the command prompt. All you need to do is launch the command prompt as Admin again, by following the above-given guide. Then, type the following and press enter after each:

  • cd /users/Your_Username_Here
  • icacls Pictures /reset /t /q
  • cd /<type directory to OneDrive folder here>
  • icacls Pictures /reset /t /q

Remember, you can drag and drop the directory, as well. But once you follow through with the command, restart the PC. See if the problem for OneDrive is solved. If still not, you can access Microsoft Support.

8. Google Drive Access Denied Error

You can also get Google Drive access denied error like One Drive. You can try the following steps:

  • Press CTRL + Shift + Esc. This will open Task Manager.
  • Find the Google Drive processes in the Task Manager.
  • Right-click on each and select End Task. Repeat it for all Google Drive tasks.
  • Now, uninstall Google Drive from your system.
  • Launch Run utility again (Windows + R key).
  • Type %localappdata%Google and hit enter.
  • Find the Drive folder in that directory. Rename it to Drive.old

Now install Google Drive again and see if it solves the issue.

9. Change Your Account To Administrator

If you can’t seem to make the above-given changes or can’t access the Admin account, you can try this step. If you still get Access Denied Error, give this a go:

  • Press Windows + R key to launch Run. Then type control userpasswords2 and hit enter.
  • This will open Users Accounts. Check on ‘Users must enter a user name and password to use this computer.’
  • Select your account and go to the properties.
  • Find the Group Membership tab and select Administrator in the options. Click Apply and Press OK. See if this solves the issue.
  • You will have to restart the PC once.

10. Edit The Registry

Often, you can fix a lot of errors by editing the Registry. But it would help if you were careful. While the registry seems full of texts, it is integral for your PC’s functions.

So, when doing anything with the registry, make sure to make a system or registry backup. This way, if you mess up, you can recover. You can make a system restore point before you try this step:

  • Press Windows + R key, and type Regedit, then hit enter.
  • Go to the directory key: HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesLanmanWorkstationParameters
  • Now, on the right side of the panel, click on the space. Select New > DWORD (32-bit) value.
  • Now, enter ‘AllowInsecureGuestAutth’ as the name of the new DWORD.
  • Once created, double click on the name and go to properties. Find the Value Data and set it to 1. Then click OK.
  • Restart your PC and see if this solves the problem for the access denied errors.

Remember, this setting only works for network shared folders. It won’t work for the local files and folders.

11. User Account Control To Install An application

User Account Control features

Generally, the reason behind Access denied could be User Account Control. The User Account Control features give the Admin privileges or take them away. Usually, it pops up when you’re trying to access folders that need Admin permission.

Similarly, it appears when you try installing a new app or software that can change your system. At the same time, you can get the same access denied error. So try these steps:

  • Use the Search Bar below to type User Accounts and select it from the list.  For other Windows Users (7 and 8) you can press Windows + S key.
  • Go to Change User Account Control Settings option. Now, there will be a slider. Move it down.
  • Click OK and save changes.
  • Now try to install the apps again.

12. Change The Permissions Of Temp And Installer Folders

If you’re still having trouble installing a new app, it could be due to temp or installer folders. This happens when you don’t have permission to access them.

You can use the above-given steps to change the permission. Check these directories:

  • C: WindowsInstaller
  • C: Users/Your_User_Name/AppDataLocalTemp

Change their permissions by going to properties as you would do for any folder or file.

13. Access Denied For Zipped Folder

Did you face the denied access error when creating a zipped folder? It could be due to the %TEMP% variable not being set correctly. You will have to configure and fix the environment variable for this. Follow these steps:

  • Go to the Search Dialog box and find Advanced System Settings (View Advanced System Settings).
  • Click on the Environment Variables option.
  • Find TEMP in the list and check the value. Double click on the temp and do the following: %USERPROFILE%AppDataLocalTemp
  • Save the changes by clicking Apply and OK.
  • Then restart the PC

Now, reaccess the temp folder. You can do it by typing %TEMP5 in Run or File Explorer. See if you can create a folder in the TEMP. If you can, then good. Otherwise, you must go to the TEMP folder’s properties and change the permissions. For this, use the above-given steps of modifying a folder’s permission,

14. Access Denied Error For Command Prompt

There are many reasons to get Access Denied when trying to access Command Prompt. You can start by pinning Command Prompt to Start Menu. For some strange reason, this solution often works. It changes the directory.

  • All you need to do is search for the command prompt.
  • Right-click on it and select the ‘Pin To Start Menu’ option.
  • Now, try and see if you can launch Command Prompt.

Did you get an error while working with Command Prompt? Some commands and permissions need Admin permission. 

Thus, you can end up getting access denied error. This could be annoying if you were deep in the command chain. To prevent this problem from occurring, launch command prompt as Administrator.

  • Search for Command Prompt in the Search Bar.
  • You can also use the one Pinned to Start Menu.
  • Right-click on it and select ‘Run As Administrator.’
  • You can also right-click Start Menu and select Command Prompt (Admin).

15. Access Denied Errors In Hard Drive

Are you having trouble accessing the hard drive’s component? This Access Denied Error could surface, especially for the secondary hard drives. The first step would be to change the permissions and the ownership of the Hard Drive.

You can follow the same Properties and Security Settings steps, going to Advanced. It follows the same pattern as a file or folder. But, if nothing works, the best way is to give Full Control to the Everyone Group in permissions.

Also, try not to change the permission of your system’s drive or drive partition. Changing the drive permission in which system files are installed can lead to problems. So, try never to do that as you will end up causing more problems and errors.

16. External Hard Drive Access Denied Error

Apart from the hard drive, or secondary hard drive, you might have an external one. You can face an access denied problem for this, but you can fix it conveniently:

  • Go to This PC and find the External Hard Drive.
  • Right-click on it and go to properties.
  • Now, see the Sharing Tab and go to Advanced Sharing.
  • In the Advanced Sharing option, locate the ‘Share this folder’ option.
  • Click on permissions and once again, select Everyone and select Full Control. Allow it and press Apply, then OK.
  • Reconnect the External Hard Drive and see if it solves the problem.

17. Windows Access Denied – Notepad And Other Apps

Run compatibility troubleshooter

Are you having a problem or access denied error message with Notepad or other apps? It could be related to permissions, as well. You can try and run the app as an Admin. There are two ways to do it.

  • First, you can right-click on the app icon and select the Run As Administrator option. Then, you will get a pop-up window and allow access. Sometimes, you might have to put in Admin credentials to access it. But this is a temporary solution, and you will have to repeat it repeatedly.
  • The second option is to enable Run as Administrator permanently. For this, go to the Properties of the app. In the compatibility tab, find ‘Run this program as an Administrator.’ Check it on.
  • You can also go to Properties and General Tab. Go to Advanced and check on ‘Run As Administrator.’ Then click on Apply and OK to save changes.

This option works for almost any app or platform that you want to run. Try this option if you’ve been having access-denied issues with any app.

18. Fix Automatic Start Up Apps

Some apps that automatically load with a startup may also cause the error. If you’re getting an Access Denied error for any such app, you can change the .ini file for the app:

  • Go to the C Drive and go to the View option in the top tab. Select Hidden Files and File Name Extensions. This will enable you to see .ini files.
  • Now, locate the ini file for your app in the C Drive directory. It could be for a Notepad, or any other app.
  • Right-click on the file and select Open With. Then select ‘Choose Another App.’
  • Select ‘Provisioning Package Runtime Processing Tool’ and click OK.
  • Restart the PC and see if this solves the issue.

Usually, this option works for almost any app or software. Remember, this is not for files and folders.

19. Check The Antivirus Settings

security tab windows folder security ownership tab microsoft data create free note explorer correct ticket previous logged

If you’ve tried every other known solution but still run into the problem, it could be the antivirus. Yes, the antivirus can prevent you from accessing specific files. It happens because the software considers the folder or file as a threat.

To fix this, you will have to access the individual settings of your antivirus. Then, you will have to allow the file or folder to allow access. You can also try temporarily disabling the antivirus. Usually, that works wonders. But the problem might appear again once you activate the antivirus.

20. USB Drives Blocked Access Denied

Are you trying to access a file or folder on a USB device? This could be for a USB Flash Drive or Hard Drive. Either way, you might face the access denied error message. This can lead to the prevention of files and folders access. There can be many reasons for it, but usually, the registry editor can fix this:

  • Open the Registry Editor and find the Computer in the Left Panel.
  • Then Press CTRL + F and find RemovableStorageDevices in the option. Click Next.
  • Once you find it, check its values. See if DENY is set to 1. Either way, set it to 0.
  • Make sure to save changes.

If this value isn’t available in your registry, don’t make any changes. Don’t try to mess with the registry editor too much.

21. Delete The Desktop.ini Files

This solution is only if you consistently face the access denied error message. Do you start up each time and receive the Access is Denied error? Then the problem is with the desktop.ini file. You can locate it and delete it. All you need to do is:

  • Go to the directory.
  • C:/Users/Your_User_Name/AppData/Roaming/MicrosoftWindows/StartMenu/Startup
  • C:/ProgramData/MicrosoftWindows/StartMenu/Programs/Startup
  • Find the desktop.ini file in both of these directories.

Make sure to view hidden files from the view option. After all, it could be hidden. Now, go ahead and delete these files. Remember that it is a critical step and should only be done as a last resort.

22. Uninstall The Third-Party Device Manager

The most common third-party device manager is the HP Device Manager. But, you might have tried other kinds of device managers as well.

These device managers can make accessing the hard drive partition or different devices difficult. As such, it is better to uninstall them. You can uninstall the HP device manager by following the simple steps.

  • Go to the Control Panel and the Programs Window. Then Uninstall the program and select HP Device manager.
  • You can also try the apps section if you can’t find it there.

Remember that you won’t be able to uninstall the built-in device manager. This is mainly the HP Device manager, as several users have reported problems with it.

It’s a very common action to move a file or folder from one place to another due to certain needs (free up disk space or ensure security). However, it would be much depressed when you can’t copy files from external hard drive to computer (or vice versa). This post shows you how to deal with the Windows can’t copy or move files problem efficiently.

File Access Denied When Copying or Moving Files

According to users’ feedback, the file access denied error appears now and then on their device to prevent them from copying or moving files successfully. Some people reported Windows 10 not copying all files while others said that they can’t move files between folders or Windows 10 cannot copy multiple folders.

Believe it or not, MiniTool Solution is very professional in data backup, file recovery, and problems troubleshooting.

There are many people complained Windows 10 won’t let me move files; they said the system doesn’t allow them to copy, move or delete a file/folder.

Case 1: Windows 10 won’t let me move a file.

I have recently downloaded a file folder and it contains a file rld.dll. When I try to copy this file to a different folder it asks for administrator permission. After I give the administrator permission it pops up with you need permission to perform this action and also you require permission from everyone to edit this file, but I have the only account on the PC. Does anyone know a solution to this?— from AlexTravers

Case 2: Windows 10 won’t let me move/delete files as an Admin.

Went from Windows 7 to Windows 10, and while there are some serious issues I’m really liking Windows 10 so far—unfortunately, I can’t delete/move files on my PC though I am an Admin with full controls and such. One file is on my desktop, but it won’t let me delete from libraries either, or move them to another local. Any help?— from AtheresRiften

Case 3: I can’t copy a folder to my USB drive.

I have an 8 GB USB drive. When I tried copying a folder of 90 MB with 4 files, it becomes unresponsive (Not Responding is displayed). I have to go to Task manager to end the task. It is not write protected in any way. I can create a folder and then copy my files individually to that folder. Also, I can copy files back from USB to my hard drive. Details of my USB drive: Files System: NTFS, Free Space Available: 7.03 GB.— from skay

Case 4: Windows 10 can’t drag & drop files at times… and other bugs.

Not sure what happened or if it’s a virus???? But I can’t drag & drop files at times, sometimes I can, sometimes it won’t, when I can’t drag n drop I also can’t right-click anything. The options window would pop up for a millisecond and just vanish. It’ll get pretty bad; it would also just close programs automatically. I’ve tried the end process tree in explorer, disabling chrome extensions, uninstalling chrome, explorer, etc., disabled my touch pad, tried a new mouse; even did a factory reset on my laptop and still no fixes. Someone please help!!!!— from The©hosenOne

In summary, the Windows 10 can’t copy or move files cases can be divided into the following 6 types; please read them with care to find out the best solutions for fixing file or folder access denied.

Can’t Copy or Move Files/Folder Windows 10

Please try the methods mentioned below when you can’t copy files to external hard drive Windows 10 or to the local drive.

#1. Check account permissions.

  1. Press Windows + S to open the Windows search bar.
  2. Type control panel into it and hit Enter.
  3. Select User Accounts. (Click User Accounts again if you view by Category.)
  4. Click Manage another account link under Make changes to your user account section.
  5. Take a look at the accounts in the list and check whether there’s an “Administrator” word under the target account name.

Administrator

How to change your account to Administrators if it’s not:

  1. Press Windows + X simultaneously.
  2. Choose Computer Management from the WinX menu.
  3. Expand Local Users and Groups under System Tools.
  4. Select Users in the left sidebar and then look at the right panel.
  5. Double click on the target account to open the Properties window.
  6. Shift to the Member Of tab at the top.
  7. Click on the Add… button at the bottom left.
  8. Look for the Enter the object names to select section in Select Groups window.
  9. Type Administrators into the text box and click Check Names.
  10. Click on the OK button.
  11. Select Administrators. Then, click Apply and OK to confirm changes.
  12. Restart your computer.

Check Names

#2. Run SFC scan.

  1. Open Windows search bar and type cmd.
  2. Right click on Command Prompt from the search result.
  3. Choose Run as administrator from the menu. (Click Yes if you see a User Account Control window.)
  4. Type (or copy & paste) the command: sfc/scannow.
  5. Press Enter and wait for the scan to finish.

SFC scan

If the SFC scan failed, you should try the DISM tool.

  1. Repeat step 1 to step 3.
  2. Copy & paste this command and press Enter: DISM /online /Cleanup-Image / ScanHealth.
  3. Wait for the command to finish.
  4. Copy & paste this command and press Enter: DISM /Online /Cleanup-Image /RestoreHealth.
  5. Wait for the command to end and reboot your PC.

DISM

[Solved 2020] DISM Failed On Windows 10/8/7 Computer!

#3. Restart Windows Explorer.

Another way to fix when you cannot move files in Windows Explorer is restarting it by following steps:

  1. Right click on the blank space in the task bar.
  2. Choose Task Manager from the pop-up menu. (You also press Ctrl + Alt + Delete to choose Task Manager.)
  3. Make sure the Processes tab is chosen.
  4. Look for Windows Explorer and select it.
  5. Click on the Restart button in the lower right corner. (You can also choose Restart from the context menu of Windows Explorer.)

Restart

[SOLVED] Windows Explorer Needs To Be Restarted: Problem Fixed!

#4. Scan for virus and malware.

  1. Close all the programs, applications, and pages you’re working on.
  2. Press Windows + I to open the Settings app.
  3. Choose Update & Security.
  4. Select Windows Security from the left sidebar and click Virus & threat protection from the right pane.
  5. Choose Scan options under Current threats if your Windows 10 is up to date; select Run a new advanced scan under Threat history if you’re running a previous version.
  6. Follow the instructions to finish the scan and remove viruses found on the device.
  7. Restart your computer.

Virus & threat protection

Can’t Copy or Move File/Folder Open in Another Program

Sometimes when you’re trying to copy or move a file/folder, you’ll get this error message: The action cannot be completed because the file (or folder) is open in another program. How to fix this on Windows 10?

#1. Close applications.

You should check the programs and apps currently running on your PC. Then, close the applications that may use the file or folder you want to copy/move.

#2. Empty Recycle Bin.

  1. Look for the Recycle Bin icon on your desktop.
  2. Right click on it and choose Empty Recycle Bin.
  3. You can also empty the Recycle Bin manually: open Recycle Bin -> press Ctrl + A to select all items here -> press Shift + Delete to clear them.

Empty Recycle Bin

How to recover files deleted from Recycle Bin?

#3. Modify local group policy.

  1. Press Windows + R to open Run dialog.
  2. Type msc into the textbox and hit Enter.
  3. Expand User Configuration, Administrative Templates, and Windows Components one by one.
  4. Select File Explorer in the left panel. Double click on Turn off caching of thumbnails in hidden thumbs.db files in the right panel.
  5. Check Enabled instead of Not Configured or Disabled.
  6. Click Apply and OK to save the changes.

Enabled

#4. Modify Registry.

  1. Open Run dialog.
  2. Type regedit and click OK.
  3. Copy and paste this to the address bar of Registry Editor and hit Enter: ComputerHKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerAdvanced.
  4. Double click on the IconsOnly DWORD in the right panel.
  5. Change the value data from 0 to 1 and click OK.

IconsOnly

You can also fix the problem by:

  • Changing DisableThumbnails DWORD
  • Creating Explorer key and creating & modifying DisableThumbsDBOnNetworkFolders DWORD

#5. Delete the Temp folders.

  1. Type %temp% into the textbox of Run dialog and hit Enter.
  2. Press Ctrl + A to select all items. Press Shift + Delete to delete them.
  3. Type temp and press Enter.
  4. Press Ctrl + A to select all items. Press Shift + Delete to delete them.

Temp

#6. Perform Disk Cleanup.

  1. Press Windows + S and type disk cleanup.
  2. Press Enter to open Disk Cleanup window.
  3. Select the drive you want to clean up and click OK.
  4. Wait for the scanning process to end.
  5. Check Thumbnails and click OK.
  6. Wait for the action to complete.

Thumbnails

Disk Cleanup Cleans Downloads Folder In Windows 10 After Update.

#7. Check disk for errors.

  1. Open File Explorer and right click on the drive with destination folder access denied error.
  2. Choose Properties from the context menu.
  3. Shift to Tools tab and go to the Error checking section.
  4. Click on the Check button and follow the instructions to finish scanning the drive.

You can also run CHKDSK command in Command Prompt tool to check & repair errors. How to fix if CHKDSK deletes your useful data?

Can’t Move or Delete File Windows 10

Sometimes, you can’t delete a file or folder even by pressing Shift + Delete. This part focuses on how to delete files that cannot be deleted. First of all, you should make sure all the applications that are using the file you try to delete (or containing it) are closed. If the problem persists, please try the following methods.

#1. Use Command Prompt.

  1. Click Start and scroll down to find Windows System.
  2. Expand it and right click on Command Prompt.
  3. Choose More and then Run as administrator.
  4. Type del and the location of the file/folder you want to delete. For instance, E:Testtext.txt.
  5. Press Enter on the keyboard.

Run as administrator

#2. Delete in Safe Mode.

  1. Open Settings by pressing Windows + I.
  2. Choose Update & Security and navigate to Recovery in the left window.
  3. Look for Advanced startup in the right window and click Restart now under it.
  4. Choose Troubleshoot, Advanced options, and Startup Settings in order.
  5. Press F4 to enable Safe Mode.
  6. Open Windows Explorer to locate the target file or folder.
  7. Delete the file/folder and restart your PC.

Restart now

Another way to delete items forcibly is using third-party tool.

Click to Tweet

If you have deleted useful files permanently by mistake, please read this to know how to get it back:

Can’t Read from the Source File or Disk

#1. Turn off your computer completely and turn it on again.

#2. Make sure the external storage is connected properly to your computer.

#3. Check the file system of the destination drive.

  1. Right click on the drive that you plan to move files/folders to.
  2. Choose Properties and look for the File system information.
  3. If it’s FAT32 or FAT16, please format it to NTFS. The FAT file system can’t support a large file (up to 4GB or 2GB). That’s why Windows 10 can’t copy large files.

You can choose to reformat the drive or convert FAT to NTFS directly!

FAT32

The Volume Does Not Contain A Recognized File System — How To Fix?

Windows 10 Can’t Copy Paste Files

If you can’t copy and paste files/folders or can’t drag and drop, you should do the following things.

#1. Make sure Windows 10 is up to date.

  1. Press Windows + I.
  2. Choose Update & Security.
  3. Click on the Check for updates button in the right window.
  4. Wait for the process to finish and install any update it founds.

Check for updates

#2. End rdpclip.exe and run it manually.

  1. Right click on the taskbar to choose Task Manager.
  2. Shift to the Details tab and look forexe under it.
  3. Right click on the process and choose End task.
  4. Go to this path: C:/Windows/System32 to find rdpclip.exe.
  5. Run it manually.

#3. Create a new user account.

  1. Open Settings to choose Accounts.
  2. Select Family & other people in the left window.
  3. Click Add someone else to this PC in the right window.
  4. Choose I don’t have this person’s sign-in information.
  5. Click Add a user without a Microsoft account. Enter a user name and click Next.
  6. Follow the instructions to finish the process and switch to this new account.

#4. Check disk for errors.

You should follow the steps mentioned in the above content to check disk in File Explorer or Command Prompt. Some users reported that checking disk has helped them solve copy and paste not working.

In addition, you can try the following methods when copy and paste doesn’t work:

  • Disable the shared clipboard feature of VirtualBox.
  • Disable Send to Bluetooth add-on.
  • Use third-party clipboard manager.

Note: You may see an Error Copying File or Folder window popping up to stop you from copying/moving files. There are many reasons causing it; for instance, there is insufficient disk space to complete operation. You should use different ways to solve the problem according to actual situation.

How to fix if you can’t move or copy a file or folder on Mac?

Can’t Copy Files/Folders to USB

In addition to the reasons and solutions mentioned in above cases, there’s a special reason to explain why you can’t copy a file or folder to a USB drive. That is the write-protection feature. If the USB drive is write-protected, you can’t add new data or edit files in it.

In this case, you’ll need to clear write-protection on it first by following ways mentioned here.

Recover Files & Folders Windows

How to Recover Mistakenly Deleted Data

Step 1: get MiniTool Power Data Recovery and install it properly (please don’t save it to the drive containing deleted files).

Free Download

Step 2: launch the software and select This PC from the left sidebar.

Step 3: specify the drive containing deleted data and double click on it.

Step 4: wait for the scan and choose the files you want to recover from the scan result.

Step 5: click Save and choose a storage destination. Click OK and wait for the recovery to end.

This PC

Please read this page to know more details on how to retrieve deleted files on PC.

How to Recover Files from External Storage

  1. Install MiniTool Power Data Recovery and run it at the end of installation.
  2. Select Removable Disk Drive from the left sidebar.
  3. Choose the target drive and click Scan.
  4. Wait for the scan and choose the file/folder you want to recover.
  5. Click Save and choose a storage path.
  6. Click OK and wait for the recovery to complete.

Scan

Click to Tweet

Please read this page if you find files lost from an external hard drive:

Verdict

In this article, I have introduced the common types of file access denied error and gave the corresponding solutions to fix it. You should determine which type your case belongs to and follow the suggestions one by one to solve the problem yourself. If you still can’t copy or move files on Windows 10 (or other systems), please leave a message below.

In many situations, windows pop up a dialogue box with an error message “Access is denied, You cannot Access this file or Folder or you don’t have permission to access this file”. As you clock on any file or folder to access it and you are getting the message as stated above then you need to assign the ownership or permission to the particular file or folder. It is a common error being faced by the users, sometimes it suggests you to delete the file but you need not delete the file or folder. In this article, I am going to discuss the best way to resolve this error, read the complete article to know to how to assign ownership or permission to a particular file or folder and you can easily resolve the access denied error.

There are mainly three issues which result in access denied message lets talk about them separately and also their resolution method to fix access denied error in windows. This error can occur in any version of windows os like win 10, win 8, win 7, win vista, win XP etc.

Case 1: – An Access Denied message will be displayed.
Case 2: – You can’t access this folder or file kindly delete, save or change the file or folder.
Case 3: – As you installed a new version of windows so you cannot open a file or folder in the new version of window.

Here I listed the common reasons for folder access denied error and any other cause may be there behind access denied error lets talk about its resolution method.

Case 1: – Getting “Access Denied Error Message”  Error

The folder/file access denied error message appears mainly in three situations which are given below:

  • If the file is encrypted.
  • If the folder ownership has changed.
  • If you do not have the appropriate permission.

Resolution Method for Windows Access Denied Error for File / Folder

1. If the File or Folder is Encrypted then

Encryption is a way to convert a readable text (plain text) into nonreadable text (ciphertext) by applying any encryption mechanism like public key or private key and this method is known as cryptography. If a folder or file is encrypted then you should have a decryption key to convert ciphertext into plain text. So first you need to determine whether the file is decrypted or not, follow the steps given below.

  • Right Click on the folder and click on the Properties option.
  • Locate the General tab and click on it.
  • Now go to the Advance button and click on it.

Now check whether the Encrypt Content to Secure Data check box is checked or not. If it is checked then you need to acquire the certificate from the person who encrypted the folder or file. If it is not checked that shows the file is not encrypted, in this situation move to the other method to resolve file access denied error in windows os.

2. Fix Access Denied Error When Folder / File Ownership changed

Folder ownership is changed error occurred when you upgrade the windows from earlier version to the newer version. During this process, some of your account information might be changed due to which you don’t have the permission to access the file or folder. In this situation, you need to assign the ownership to the folder to fix access denied error in windows 10, 8, 7, follow the steps given below to resolve this issue.

  • Right Click on the file or folder and click on the Properties from the list.
  • Click on the Security Tab and then hit  Advance button from the bottom.
  • Now click on Change Tab, if a pop up appears and ask for username and password then provide the detail click on Ok.
  • Enter the name of the person to which you want to give permission, click on Check Name tab and then click on Ok.
  • If you want to assign the permission to the person for the subfolder contained by the folder then check on the Replace Owner on Sub-containers and Object.
  • At the end click on Ok to finish this process.

3. Resolve Access Denied Error If you don’t have Appropriate Permission

Permissions are basically a set of rule which checks that you have rights to access or made any change to the particular file and folder. If you do not have appropriate permission then windows show file/folder access denied error. To check the permission follow the steps given below.

  • Right Click on the File or Folder and then hit on the Properties from the list.
  • Click on the Security Tab from the menu bar.
  • Go to Group or User Name, find your name and click on it to view permission that you have.

If you are not able to open a file and getting folder access denied error. Then check that you have read permission or not. If you don’t have read permission then follow the steps given below and to perform this operation you need to be logged in as an Administrator.

  • Right-Click on the file or folder then hit on Properties from the opened list.
  • Click on the Security Tab from the menu bar.
  • Go under the Group or User Name, click on your name to view the permission that you have.
  • Click on the Edit option and check the check boxes of permissions which you want to acquire.
  • At the end click on OK to finish the process.

Case 2: –  When you are not Able to Change,  Save,  Access & Delete Particular File/Folder

There are many situations in which you are not able to perform some operations like change, save, access or delete a specified folder and getting folder/file access denied error in windows. Here I am listing all possible reasons.

  • If the File is corrupted.
  • If the file is encrypted.
  • If the user profile is corrupted.
  • The folder ownership is changed.
  • If you don’t have required permission.

At the above I discussed how to resolve the folder access denied issues when file is encrypted, ownership is changed and if you don’t have required permission you can resolve these error from there, here I am going to discuss what to do when user profile is corrupted and file is corrupted and you are getting access denied error in windows. Then follow the steps given below:

1. When File or Folder is Corrupted then

File corruption is the most frequent reason due to which you are not able to access or modify the particular file and getting folder access denied error in windows. The most frequent reason for corruption is when a file is open and suddenly system crashed or losses power. The file may be corrupt by any virus attack as well, so in this situation, you can either delete the file if you have updated backup to resolve this issues.

2. When the User Profile Is Corrupted Then

Sometimes your local user profile got corrupted then the window will prevent you to access the file or folder and shows file or folder access denied error. In this situation, you need to delete the current profile and create new local user profile. Follow the steps given below to create the new user profile.

  • Find and click on Change PC Settings.
  • A new panel will appear, from menu bar click on Users tab.
  • Hit on the Add User button and then click on the Can they Sign in without Microsoft Account.
  • Navigate to Local Account and click on it.
  • Enter the new account name in the username field.
  • If you want to assign a password then enter the password and verify the password as well. If you don’t want to assign a password simply click on Next button without entering the password.
  • At the end click on Finish button to complete the process.

Case 3: – You are not Able to Access file or folder after Upgrading new Version of Windows

When you upgrade an existing windows version to new version then also the window shows error when you try to access a file or folder. This situation can be occurred due to some reason which is given below.

  • If the folder ownership is changed.
  • If the files are being stored in the windows.old folder from your previous system.

I have discussed above how to resolve access is denied for the file or folder error due to ownership changed you can follow the steps. Here I am going discuss what to do when the file is stored in windows.old folder.

If the File is Being Stored in Windows.old Folder Then

  • Go to My Computer and click on it or press window-E
  • Click on the drive in which window is installed, commonly its C drive.
  • Find the windows.old folder and click on it.
  • Click on the Users Folder from the list.
  • Find your file by pacifying username.
  • Open the file which you want to retrieve.
  • Copy the files which you want to access and past it into new upgraded windows library.
  • Repeat the copying and pasting steps for all files.
  • At the end close all opened tab.

Final Words!!

In this article, I tried to list all possible reasons that can cause file/folder access denied error in windows while accessing a file or folder and their resolution method. I hope this effort will help you to resolve access denied error for folder or file in windows.

I use MySQL queries all the time in PHP, but when I try

LOAD DATA INFILE

I get the following error

#1045 — Access denied for user ‘user’@’localhost’ (using password: YES)

Does anyone know what this means?

wittich's user avatar

wittich

2,1172 gold badges26 silver badges47 bronze badges

asked Feb 8, 2010 at 11:54

Brian's user avatar

0

I just ran into this issue as well. I had to add LOCAL to my SQL statement.

For example, this gives the permission problem:

LOAD DATA INFILE '{$file}' INTO TABLE {$table}

Add LOCAL to your statement and the permissions issue should go away. Like so:

LOAD DATA LOCAL INFILE '{$file}' INTO TABLE {$table}

wittich's user avatar

wittich

2,1172 gold badges26 silver badges47 bronze badges

answered Nov 12, 2010 at 6:59

jeremysawesome's user avatar

jeremysawesomejeremysawesome

7,0135 gold badges33 silver badges37 bronze badges

10

I had this problem. I searched around and did not find a satisfactory answer. I summarise below the results of my searches.

The access denied error could mean that:

  • ‘user’@’localhost’ does not have the FILE privilege (GRANT FILE on *.* to user@'localhost'); or,
  • the file you are trying to load does not exist on the machine running mysql server (if using LOAD DATA INFILE); or,
  • the file you are trying to load does not exist on your local machine (if using LOAD DATA LOCAL INFILE); or,
  • the file you are trying to load is not world readable (you need the file and all parent directories to be world-readable: chmod 755 directory; and, chmod 744 file.dat)

eel ghEEz's user avatar

eel ghEEz

1,18611 silver badges24 bronze badges

answered May 27, 2013 at 1:42

Yamir Encarnacion's user avatar

4

Try using this command:

load data local infile 'home/data.txt' into table customer;

This should work. It worked in my case.

pacholik's user avatar

pacholik

8,5899 gold badges43 silver badges55 bronze badges

answered Apr 2, 2017 at 17:36

shreyas-agrawal's user avatar

3

Ensure your MySQL user has the FILE privilege granted.

If you are on shared web hosting, there is a chance this is blocked by your hosting provider.

answered Feb 8, 2010 at 23:46

tanerkay's user avatar

tanerkaytanerkay

3,7991 gold badge19 silver badges28 bronze badges

1

If you are trying this on MySQL Workbench,

Go to connections -> edit connection -> select advanced tab

and add OPT_LOCAL_INFILE=1 in the ‘Others’ text field.

Now restart the connection and try.

enter image description here

answered Mar 9, 2021 at 9:33

Ravinda Lakshan's user avatar

1

I found easy one if you are using command line

Login asmysql -u[username] -p[password] --local-infile

then SET GLOBAL local_infile = 1;

select your database by use [db_name]

and finally LOAD DATA LOCAL INFILE 'C:\Users\shant\Downloads\data-1573708892247.csv' INTO TABLE visitors_final_test FIELDS TERMINATED BY ','LINES TERMINATED BY 'r n' IGNORE 1 LINES;

answered Nov 15, 2019 at 7:58

Shantanu Khond's user avatar

2

The string from Lyon gave me a very good tip: On Windows, we need to use slahes and not backslashes. This code works for me:

    File tempFile = File.createTempFile(tableName, ".csv");
    FileUtils.copyInputStreamToFile(data, tempFile);

    JdbcTemplate template = new JdbcTemplate(dataSource);
    String path = tempFile.getAbsolutePath().replace('\', '/');
    int rows = template.update(MessageFormat
            .format("LOAD DATA LOCAL INFILE ''{0}'' INTO TABLE {1} FIELDS TERMINATED BY '',''",
                    path, tableName));
    logger.info("imported {} rows into {}", rows, tableName);

    tempFile.delete();

answered Aug 9, 2013 at 17:50

Matthias Wuttke's user avatar

Matthias WuttkeMatthias Wuttke

1,9472 gold badges21 silver badges38 bronze badges

I ran into the same issue, and solve it by folowing those steps :

  • activate load_infile variable
  • grand file permission to my custom mysql user
  • deactivate secure_file_priv variable (my file was uploaded by the webserver to the /tmp folder which is of course not the secured directory of myslq /var/lib/mysql-file)

For this 3rd point, you can refer to : https://dev.mysql.com/doc/refman/5.7/en/server-system-variables.html#sysvar_secure_file_priv

BR,

AD

answered May 11, 2017 at 10:21

user7996813's user avatar

This happened to me as well and despite having followed all the steps described by Yamir in his post I couldn’t make it work.

The file was in /tmp/test.csv with 777 permissions. The MySQL user had file permissions, LOCAL option was not allowed by my MySQL version, so I was stuck.

Finally I was able to solve the problem by running:

sudo chown mysql:mysql /tmp/test.csv

answered Aug 21, 2017 at 15:02

Giacomo's user avatar

GiacomoGiacomo

1,7481 gold badge23 silver badges35 bronze badges

0

I discovered loading MySQL tables can be fast and painless (I was using python / Django model manager scripts):

1) create table with all columns VARCHAR(n) NULL e.g.:

mysql> CREATE TABLE cw_well2( api VARCHAR(10) NULL,api_county VARCHAR(3) NULL);


2) remove headers (first line) from csv, then load (if you forget the LOCAL, you’ll get “#1045 — Access denied for user ‘user’@’localhost’ (using password: YES)”):

mysql> LOAD DATA LOCAL INFILE "/home/magula6/cogswatch2/well2.csv" INTO TABLE cw_well2 FIELDS TERMINATED BY ',' LINES TERMINATED BY 'n'
    -> ;
Query OK, 119426 rows affected, 19962 warnings  (3.41 sec)


3) alter columns:

mysql> ALTER TABLE cw_well2 CHANGE spud_date spud_date DATE;

mysql> ALTER TABLE cw_well2 CHANGE latitude latitude FLOAT;

voilà!

answered Jul 7, 2019 at 17:23

magula's user avatar

magulamagula

1417 bronze badges

I was trying to insert data from CSV to MYSQL DB using python.
You can try the below method to load data from CSV to Database.

  1. Make a connection with the Database using pymysql or MySQL.connector any library you want in python.
  2. Make Sure you are able to use the in-line while connecting for that while providing host, user, and password try to add local_inline=True.

Skipping to load data part.
sql = f'''LOAD DATA LOCAL infile "filename.csv" INTO TABLE schema.tablename FILED TERMINATED BY ',' ENCLOSED BY '"' LINES TERMINATED BY 'rn'''' Note: If you have column names in CSV, use IGNORE ROW 1 LINES. The execute the sql by: cursor.execute(sql) conn.commit() conn.close()

answered Sep 17, 2022 at 4:27

Rahul Yadav's user avatar

It probably means that the password you supplied for 'user'@'localhost' is incorrect.

answered Feb 8, 2010 at 11:55

David Grant's user avatar

David GrantDavid Grant

13.9k3 gold badges57 silver badges63 bronze badges

1

Понравилась статья? Поделить с друзьями:
  • Ошибка fltmgr sys windows 10
  • Ошибка fifa manager 14 requires hardware graphics acceleration
  • Ошибка flood control что это такое в вк
  • Ошибка floating point division by zero при установке
  • Ошибка floating point division by zero как исправить