[Last Call] Learn about multicloud storage options and how to improve your company's cloud strategy. Register Now

x
?
Solved

cannot reset file permissions on two folders

Posted on 2014-12-12
10
Medium Priority
?
149 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

 
LVL 13

Accepted Solution

by:
Gabriel Clifton earned 2000 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 24

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 56

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 56

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 56

Expert Comment

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

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Detailed instructions on how to install an Access add-in in recent versions of Office and Windows (with screen shots)
When you start your Windows 10 PC and got an "Operating system not found" error or just saw  "Auto repair for startup" or a blinking cursor with black screen. A loop for Auto repair will start but fix nothing.  You will be panic as there are no back…
The goal of this Micro Tutorial is to help navigate beginning users with the app store on Windows 8. It will explain exciting features how to maximize your PC through these apps. This will be demonstrated using Windows 8 operating system.
This Micro Tutorial will teach you how to reformat your flash drive. Sometimes your flash drive may have issues carrying files so this will completely restore it to manufacturing settings. Make sure to backup all files before reformatting. This w…
Suggested Courses

656 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