Solved

cannot reset file permissions on two folders

Posted on 2014-12-12
10
146 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
Edgartown IT Case Study

Learn about Edgartown's quest to ensure the safety and security of the entire town's employee and citizen data. Read the case study!

 
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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
pathname length 35 60
Event ID: 2005 / Source: Microsoft-Windows-PerfNet 4 124
Task with PowerShell Script is failing with 0x41301 7 124
DHCP lease duration / Migration 8 95
The Samsung SSD 840 EVO and 840 EVO mSATA have a well-known problem with a drop in read performance. I first learned about this in an interesting thread here at Experts Exchange: http://www.experts-exchange.com/Hardware/Storage/Hard_Drives/Q_2852…
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
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). …
With the advent of Windows 10, Microsoft is pushing a Get Windows 10 icon into the notification area (system tray) of qualifying computers. There are many reasons for wanting to remove this icon. This two-part Experts Exchange video Micro Tutorial s…

730 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