I'm trying to delete a folder as an administrator, but I get the message "You require permission from UserAdam to delete folder". The problem is, I am logged on as UserAdam! I've tried changing the owner to Administrator to no avail also.
-
@MonkeyWithMachine Thanks for the reply. I've already tried that I'm afraid - I am the owner of the file, but still cannot delete it. – acernine May 03 '17 at 18:53
-
1Sub files as well? – MonkeyWithMachine May 03 '17 at 18:55
-
2I just deleted all of the sub files using FileAssassain and that let me delete the folder. Thanks for the help :) – acernine May 03 '17 at 18:56
-
1No problem! Glad I could help. – MonkeyWithMachine May 03 '17 at 18:59
9 Answers
I ran into the same problem: tried to delete a folder (as admin), but got an error message "You need permissions from MYCOMPUTER\Admin
..." Somehow this worked:
I just went into the folder and deleted everything inside. Now when I try to delete the folder, it works fine.
Not sure why, but it seems like you found a similar solution. However, there's no need to use FileAssassin, just simply highlight the folder contents and delete like normal.

- 407
- 4
- 6
To add some additional detail, in the case of needing permission from yourself, It's likely that you currently have an application that is using a file/ has a lock on that folder/files inside that will throw an error.
Closing relevant applications may remedy this, if not a restart will clear all the file locks which might free it.
If neither of those things work then the ACL permissions on the folder are probably malformed and corrupted somehow

- 1,757
- 12
- 23
-
-
@XboxOne Honestly it's hit and miss and It's been a completely different thing every time for me. Don't really remember – Prodigle Aug 17 '20 at 21:07
-
1@Prodigle This was the bit of info I needed! Your comment let me know that VS Code/Git Bash was probably what was locking me from being able to delete my .git folder in a local repo. Closing VS Code allowed me to successfully delete the folder. – Eric Hepperle - CodeSlayer2010 Jan 17 '22 at 14:56
-
1@EricHepperle-CodeSlayer2010 happy to help! catches me out a lot even still – Prodigle Jan 19 '22 at 14:05
-
1@EricHepperle-CodeSlayer2010 This is especially an issue with Git's new (experimental) file watching feature. – Darryl Noakes Jun 21 '23 at 18:03
-
-
[Microsoft's PowerToys suite of tools](https://learn.microsoft.com/en-us/windows/powertoys/) comes with a tool called ["File Locksmith"](https://learn.microsoft.com/en-us/windows/powertoys/file-locksmith), which will tell you exactly what processes are using a given file/ directory, if you're having trouble figuring out exactly what app is using this folder. – zcoop98 Aug 25 '23 at 22:16
This worked for me:
- Open
command prompt
as administrator - Execute
rd /S /Q "P:\Ath\To\Directory"
I got no error and my folder was succesfully deleted.

- 1,045
- 10
- 27
-
6
-
1Make sure you close your command prompt window before trying to delete, because the command prompt window might have a lingering handle in the directory, preventing the delete. That was the additional step I needed to get my difficult delete to work. – Blake Senftner Mar 31 '20 at 22:24
-
-
Strangely, this works for me even without running Command Prompt in administrator mode. – Mar 01 '22 at 21:58
I had the same problem, and I found a fairly simple fix that hasn't been mentioned yet and probably has the best chance of working.
Simply give full access to "Everyone" in the file's properties, then delete it right after.
To change the file's access, as administrator: open the context menu and go Properties -> Security -> Advanced
. This should bring up a new window that lists multiple users and their access to the file/folder, specifically Everyone
. Select Everyone
and click edit
. In the following menu, select Full Control
, then click OK
.
The file should now be accessible to everyone- including you- allowing it to be deleted.

- 348
- 1
- 3
- 15
If you have the project open in Visual Studios, close out of it and then delete the file.
Had this problem today and didnt see this answer anywhere

- 340
- 2
- 5
- 13
-
The error would be different then. It would say `File in use`, not `You require permission from "Myself"` – Xbox One Aug 14 '20 at 21:10
-
Dude, thank you! It did NOT say that the files were in use but somehow they must have been. Thx for saving me after around 20min off googeling! Same applies to VS Code btw (which I use). – Coronon Dec 13 '20 at 15:29
-
@XboxOne you'd think, but no. I just got the error mentioned in this question, and the solution was to close the application that was using the file. – Matt Nov 09 '22 at 03:01
One important "fix" for this issue which must be mentioned:
Try rebooting your machine first!
In some cases this is capable of fixing user control issues, where a file belongs to the current user, yet the current user is unable to change access or remove the file, due to "Access denied".

- 1,726
- 1
- 10
- 22
I had the same issue and I had to enable inheritance.

- 21
- 2
-
-
This is the only solution that worked for me. Instead of clicking through the GUI for every file individually, you can run this in an elevated cmd prompt: `icacls "path/to/folder/*" /inheritance:e /t`, where `/inheritance:e` enables inheritance and `/t` does so recursively. – Harry May 20 '22 at 11:18
I think its a bug or something. When the file is in use (It's open in sublime text or maybe some other text editors) it won't say file in use. Instead, it will say you don't have permission. If you don't know what it's open in, logout and it should be deletable. (At least that's what happened to me)

- 51
- 2
If you tried changing the permissions to 'everyone' for the folder through the security tab and it still asks for "myself"'s permission, then there must be files or folders inside this folder whose permissions need to be changed too. I just found out this, changed the permissions and now happily deleted the troublesome folder.