You require permission from "Myself" to delete folder - how to fix [closed]
Asked Answered
S

9

18

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.

Sedberry answered 3/5, 2017 at 18:44 Comment(3)
@Austin Thanks for the reply. I've already tried that I'm afraid - I am the owner of the file, but still cannot delete it.Sedberry
Sub files as well?Austin
I just deleted all of the sub files using FileAssassain and that let me delete the folder. Thanks for the help :)Sedberry
T
34

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.

Tyree answered 3/8, 2017 at 17:35 Comment(0)
E
8

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

Elgon answered 29/3, 2019 at 10:38 Comment(5)
How do you un-corruptify the ACL permission?Despotic
@XboxOne Honestly it's hit and miss and It's been a completely different thing every time for me. Don't really rememberElgon
@Elgon 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.Voyeurism
@EricHepperle-CodeSlayer2010 This is especially an issue with Git's new (experimental) file watching feature.Stuffed
Microsoft's PowerToys suite of tools comes with a tool called "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.Pentagram
R
8

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.

Ruth answered 16/11, 2019 at 2:16 Comment(0)
E
6

This worked for me:

  1. Open command prompt as administrator
  2. Execute rd /S /Q "P:\Ath\To\Directory"

I got no error and my folder was succesfully deleted.

Esterify answered 28/2, 2018 at 10:28 Comment(4)
I get "Access is denied" on everything it tries to delete.Papert
Make 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.Feckless
This worked for me before, but I am hopelessly stuck now...Despotic
Strangely, this works for me even without running Command Prompt in administrator mode.Polypary
M
2

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

Mikelmikell answered 2/4, 2018 at 14:23 Comment(3)
The error would be different then. It would say File in use, not You require permission from "Myself"Despotic
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).Labio
@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.Fierce
P
2

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".

Populace answered 19/11, 2021 at 13:50 Comment(0)
C
2

I had the same issue and I had to enable inheritance.

From the comments: 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.

Coincidence answered 21/11, 2021 at 23:38 Comment(3)
Please do not answer this way, rather comment!Obsolescent
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.Tipton
Please include how to enable inheritance in your answer.Halifax
E
0

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)

Eastsoutheast answered 17/9, 2020 at 23:45 Comment(0)
P
0

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.

Priestcraft answered 16/8, 2021 at 13:32 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.