Solved

cannot reset file permissions on two folders

Posted on 2014-12-12
10
144 Views
Last Modified: 2014-12-12
I am working on a clients PC and there are two folders that I cannot delete. I am logged in as the administrator and resetting the permissions still doesn't allow me to delete those two folders.
How do I forcibly take control of them so that I can delete them and all the files underneath those two folders?
0
Comment
Question by:johnny181
  • 3
  • 3
  • 2
  • +2
10 Comments
 
LVL 1

Expert Comment

by:Mohammed Asish
ID: 40496539
What error message do you get when you attempt to delete these folders?
0
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40496555
Can you make yourself the owner of the folders, then change permissions and finally delete?
0
 

Author Comment

by:johnny181
ID: 40496557
access denied on lots of the files underneath those two folders.
I've also tried Takeown /R /F C:\Temp and that didn't reset them
BTW, the two folders are in C:\Temp
0
Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

 
LVL 13

Accepted Solution

by:
Gabriel Clifton earned 500 total points
ID: 40496590
OK, here is something to try.
1. Download PsExec.exe from http://technet.microsoft.com/en-us/sysinternals/bb897553.aspx.
Boot into Safe Mode to ensure nothing is accessing the files in the folder.
Move PsExec to C:\Temp
Open a command prompt with Administrator Privileges and CD into C:\temp.
Run: psexec -s -i cmd.exe, this installs a temporary service which will open a command prompt under LOCAL SYSTEM account. The service will be automatically deleted after you exit from the psexec prompt.
Run: ATTRIB -R -S -H <folder>
Run: TAKEOWN /F <folder> /R /D Y, this will set the Administrators group as owner, it recurses all folders and files in the folder.
To give the Administrators group full control rights, run ICACLS <folder> /grant administrators:F /T, the /T indicates that this operation is performed on all matching files and directories below the directories specified.

This process may take a few logoff/logon or reboots to catch every file and folder.
0
 
LVL 23

Expert Comment

by:Eirman
ID: 40496732
Try this really excellent and free utility to remove the locks on chosen files and folders ...
http://www.emptyloop.com/unlocker/
0
 

Author Comment

by:johnny181
ID: 40496795
that did the trick !!
0
 
LVL 54

Expert Comment

by:McKnife
ID: 40496799
There are some reasons why this may happen:
-file System corruption/ACL corruption
-user does not know how to reset ACLs or does not execute the takeown command elevated
-the folder path is very very long or contains characters that are forbidden

So reset the ownership info using an elevated command line and then modify ACLs so that your own user shows up with full perms.
->if that still does not let you delete them, use some tool that overcomes some foldername limitations that explorer has: delinvfile. It might help you deleting it.
->if unsuccessful, do a chkdsk on your drive and retry
->if even that does not work, boot winPE (any setup disk would do) and there delete from the command line. If no setup disk is around, download the knoppix CD.

Will definitely work.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 40496805
Ah, I see I came too late. Well, since the system account cannot do anything that the admin can't when it comes to ACLs, your error before must have been having not elevated. Next time simply rightclick cmd.exe and select run as administrator, before you use takeown.
0
 
LVL 13

Expert Comment

by:Gabriel Clifton
ID: 40496973
True usually admin can do this, but sometimes permissions can get severely messed up and system needs to do the command.
0
 
LVL 54

Expert Comment

by:McKnife
ID: 40497131
By definition, this may not be... Who cares :)
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Ever wondered why Windows 8 and 10 don't seem to accept your GPO-based software deployment while Windows 7 does? Read on.
With Windows evolving further, the built-in protective mechanisms get better and better. Still, Microsoft is not very good at introducing those to the technical community. This article is about a new bitlocker functionality that could revolutionize …
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now