Can't delete a file, can't take ownership (Vista)

BehindEnemyLines

Senior member
Jul 24, 2000
979
0
0
I sometimes have this permission problem whereby I can't delete the file or take ownership of the file. If I try to delete or take ownership, I get an "access is denied" error.

Here is a screenshot: Access is denied

This also happens to some of these video files that are not in that F:\... partition. In fact, I tried copying three Scrub episodes from F:\... to drive G:\. Now, I can't delete those Scrub episodes. They all have the same errors.

I am able to delete ALL of them in Safe Mode, but this is a workaround and not a solution. Already tried closing all programs including BeyondTV, but that did not solve the error. Also, can't delete them within BeyondTV menu either.

Any idea on how I can delete these files without restarting to Safe Mode?
Can we take ownership of files that are currently "in used" or "locked"?

As far as I can tell, those video files are not locked (no reason to since they're more than a month old, Vista restarted several times, and BeyondTV wasn't running). Unlocker v1.8.5 doesn't indicate any handles on them either.
 

mechBgon

Super Moderator<br>Elite Member
Oct 31, 1999
30,699
1
0
Could you try a little experiment: Start > All Programs > Accessories, right-click Windows Explorer and choose Run As Administrator. Try taking ownership of the directory or the whole drive from the elevated Windows Explorer.

Any good? :confused:
 

BehindEnemyLines

Senior member
Jul 24, 2000
979
0
0
Originally posted by: mechBgon
Could you try a little experiment: Start > All Programs > Accessories, right-click Windows Explorer and choose Run As Administrator. Try taking ownership of the directory or the whole drive from the elevated Windows Explorer.

Any good? :confused:

Some corrections. The scrubs files are in G:\ not E:\ as previously indicated. Nevertheless, I still can't delete them. The problem is that all these files were originally created with Vista under the Home account and not XP.

1. Elevated Windows Explorer as instructed.
2. Took ownership of G:\ (the entire partition).
3. Can't take ownership of the three scrubs files. Error Applying Security

I should also mention that chkdsk G: /f found no problems.
 

mechBgon

Super Moderator<br>Elite Member
Oct 31, 1999
30,699
1
0
Next experiment: see if this guy's solution works. He says to

1) elevate a command prompt (Start > All Programs > Accessories, run Command Prompt as Administrator)

2) run the commands

takeown /f G:\ /r /d y

and then

icacls G:\ /grant administrators:F /t


Or you could grant permissions to your Users group, since that's probably how you'll be interacting with those files. Anyway, hope that works better.
 

BehindEnemyLines

Senior member
Jul 24, 2000
979
0
0
I ran

takeown /f G:\ /r /d y

but I wasn't able to see those three files since there were many entries. And the second command gives me the following (notice some non-relevant entries are removed from this list):

C:\Windows\system32>icacls G:\ /grant administrators:F /t
processed file: G:
processed file: G:\$RECYCLE.BIN
processed file: G:\2007-12
G:\Scrubs-(My Growing Pains)-2007-11-29-0.mpg: Access is denied.
Successfully processed 10 files; Failed processing 1 files

This is strange since the "My Growing Pains" is still access denied along with the other two files although they are not output to the command window. Basically, I am still unable to take ownership of these three files. Again, I am 100% sure these files are deletable in Safe Mode. I will try disabling UAC tomorrow and see what happens.

A quick comparison of the Security tab between a "normal" file and those (pic fixed): Normal Security tab & Abnormal Security tab

Allowing the Users group for Full Control also results in access denied: Allow Users Group Full Control
 

BehindEnemyLines

Senior member
Jul 24, 2000
979
0
0
I have added a few more screenshots (above) and video (below)

I think there's a bug in how Vista handles the Shift + Delete buttons (at least for this circumstance). I selected the file Scrubs-(My Growing Pains)-2007-11-29-0.mpg from Windows Explorer and pressed Shift + Delete. This should delete the file WITHOUT prompting for a confirmation. Windows did NOT prompt for confirmation AND the file actually disappeared from Explorer. In fact, no UAC prompts were issued.

BUT after refreshing Explorer window, the file magically reappears. It was never deleted in the first place, only removed from the Explorer window. Someone who actually deletes the file and closes Explorer immediately (without refreshing) might be surprised the file is still there when s/he opens Explorer again.

So what are the problems?:

1. UAC never made a peep (when a regular delete would).
2. It merely disappeared from the Explorer Window, but not actually deleted.

This is the best I can do for now: Shift + Delete (possible bug) Video

1. Shift + Delete occurs at about 4sec --> file disappears, no UAC prompt, no confirmation, no error
2. Refreshes occurs at about 7sec --> file reappears after refreshing with F5 button
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: VirtualLarry
Wow, Vista is so retarded, it can't even delete files. :p

Larry, seems your on troll-page as of late (again). If you can't add anything usefull to the thread, don't respond. You can consider this a warning.

 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
Originally posted by: BehindEnemyLines
I sometimes have this permission problem whereby I can't delete the file or take ownership of the file. If I try to delete or take ownership, I get an "access is denied" error.

Here is a screenshot: Access is denied

This also happens to some of these video files that are not in that F:\... partition. In fact, I tried copying three Scrub episodes from F:\... to drive G:\. Now, I can't delete those Scrub episodes. They all have the same errors.

I am able to delete ALL of them in Safe Mode, but this is a workaround and not a solution. Already tried closing all programs including BeyondTV, but that did not solve the error. Also, can't delete them within BeyondTV menu either.

Any idea on how I can delete these files without restarting to Safe Mode?
Can we take ownership of files that are currently "in used" or "locked"?

As far as I can tell, those video files are not locked (no reason to since they're more than a month old, Vista restarted several times, and BeyondTV wasn't running). Unlocker v1.8.5 doesn't indicate any handles on them either.

In that screen shot it shows that is can't even read the current owner. That usually indicates something has the file open without sharing read prvs to it. Are you running bittorrent (or something like that) as a service or in the background which might have the file locked? If not grab this and see what app (if any) it shows as having the file open.

Secondly, run chkdsk, I've seen this with corrupted file systems.

Bill
 

BehindEnemyLines

Senior member
Jul 24, 2000
979
0
0
I ran chkdsk g:\ /f twice already with no bad sectors or other problems. Downloaded Handle v3.30 and ran it like so

G:\handle -a -u "Scrubs-(My Growing Pains)-2007-11-29-0.mpg"

The output indicates PID 3900 (explorer.exe) has two handles on the file. Unfortunately, I forgot to copy the content of the output. Opened up Task Manager and "End Process" on explorer.exe and the desktop/taskbar disappear.

With Command Prompt still open, I ran the command above again and the output was

No matching handles found.

which is great implying that explorer.exe no longer has handles on the three files. So I restarted explorer.exe again from the "New Task (Run...)" in the Task Manager and navigated to G:\.

Surprise, surprise: The file Scrubs-(My Growing Pains)-2007-11-29-0.mpg and Scrubs-(My Inconvenient)... had disappeared. No wonder handle.exe didn't give any open handles - it doesn't exist. The problem is that these two files did exist BEFORE I ended explorer.exe.

The remain file Scrubs-(My Identity)... is still present, and I can now view its Security Tab like a normal file. It's now deletable without a UAC prompt.

This has been a weird experience, and it seems a very, very small number of users do have problems with deleting files. The main cause is most likely explorer.exe holding on to the file for whatever reason. It would be much more informative if Windows would give a "Detail" button whenever it can't perform an operation on a file/folder. Same thing when you try to remove a flash drive and something is using it.
 

bsobel

Moderator Emeritus<br>Elite Member
Dec 9, 2001
13,346
0
0
The main cause is most likely explorer.exe holding on to the file for whatever reason

The usual cause of this in my experience is a buggy explorer shell extension, it opened the file for some reason when you browsed the folder and never released it. I've have malformed videos cause some parsers to crash, so that could have been it.

It would be much more informative if Windows would give a "Detail" button whenever it can't perform an operation on a file/folder. Same thing when you try to remove a flash drive and something is using it.

Well technically it did, it deleted the file which set the delete on close bit on it (hence when explorer finally closed they where gone). But yea, the fact that my clue was the 'unable to read security information' and that wasn't a little more prominent to the user that perhaps that indicated that 'no, explorer cant currently access this file' would be helpful.

That said if I had to place a bet, I'd say one of your explorer plugins was the culprit.

Bill
 

jfynmore

Junior Member
Sep 4, 2008
1
0
0
With me, the Delete option disappeared from my drop down menu on a USB drive intermittently and randomly. After trying some of the arcane procedures I found here and there on the Web, (no help) I discovered I could fix the problem by turning my USB drive off and on again while my computer was running.

As of right now I believe, because of intermittent problems not only with Delete but also with Search, that trying to fix Vista problems by changing settings is a waste of time because Vista will just break itself again, intermittently and randomly.

Paco
 

Thumann

Junior Member
Sep 4, 2008
1
0
0
Not to ressurect old topics :)
But i've seen this now and then.. i had the issue on a seperate drive (not my system drive)
I had the exact same issues...

I went into diskpart, set the drive to offline.. put it back online and i was then able to delete the folders in question.. (the folder that gave me the error, last one in the directory structure was actually gone when i put it back online, chkdsk set everything was fine)
 

tcsenter

Lifer
Sep 7, 2001
18,351
259
126
Originally posted by: BehindEnemyLines
I sometimes have this permission problem whereby I can't delete the file or take ownership of the file. If I try to delete or take ownership, I get an "access is denied" error.

Here is a screenshot: Access is denied
I exprienced the same issue recently when working with a notebook HDD that I installed into a USB2.0 enclosure. The drive had Windows XP installed and I was trying to recover some files before wiping it and reinstalling Windows due to a nasty XP Antivirus 2008 infection (neighor's computer).

When trying to delete some files or open some folders, I received the same notification and screens shown above. When I changed ownership to Administrator under my system (Vista), it would give me the same error seen here, but after clicking through the error box, it seemed to change permissions anyway. All I had to do was wait a few to several seconds, refresh the Explorer view, then try deleting the file or opening the folder again and it worked. Weird.
 

bobsmith1492

Diamond Member
Feb 21, 2004
3,875
3
81
Mine does that sometimes. I've usually had to restart. I don't think it's happened since I installed SP1.
 

Raduque

Lifer
Aug 22, 2004
13,141
138
106
I JUST HAD this problem today. Turns out an explorer window that crashed (bad recovered ISO crashed when mounted) somehow had locked onto a video file. I used handle.exe, killed the explorer process that was holding it and was able to delete it. That's a very handy tool bsobel, thanks.
 

DSF

Diamond Member
Oct 6, 2007
4,902
0
71
I've had a similar problem, though I'm not trying to delete a file.

I've had two bluescreens playing Left4Dead, so I'm trying to open the crash dumps with windbg. It keeps telling me I don't have permission to access the file, no matter what user I'm on. It shows the same thing in the ownership window as BehindEnemyLines. Taking ownership doesn't seem to work.