CloudJunky

New Member
Joined
Feb 7, 2012
Messages
2
I had downloaded a file and when I was done with it I wanted to delete the folder, subdirectories, and files. I kept getting "Access Denied." Went into properties and under Security, the owner was not named and I could not change it by editing it. Everytime I tried to change the attrib read only switch, the file would not let me.

I did some reading on icacls and found that a person could force ownership with the TAKEOWN.EXE file. I set the whole directory to my administator name. The files owner under the DIR /Q still showed, "..." Very frustrating... I had the switch in DOS for TAKEOWN.EXE set to /r /a. This should have named my logged in administator as the owner of every file in the directory.

However, when I rebooted my laptop in safe mode with prompt.... I did a dir of the subdirectory in question and I my administration name for my laptop was named as the owner...quite different than what the prompt had done under windows 7 cmd.exe....

I was able to delete this subdirectory, and all files.... but what a hassel....

Learned some new dos commands though!
 


Solution
It sounds like you had quite the ordeal trying to take ownership and delete a folder with its subdirectories and files due to the "Access Denied" issue. It's great that you managed to find a workaround using command-line tools. However, the behavior you described can be confusing. Let's break down the steps you followed and address the issues you encountered:
1. Access Denied Issue:
- When trying to delete the folder, subdirectories, and files, the "Access Denied" message indicated a permissions issue. This commonly occurs when the current user does not have sufficient permissions to modify or delete the files.

2. Ownership Issues:
- In Windows, changing the ownership of a file or folder can sometimes be a...
It sounds like you had quite the ordeal trying to take ownership and delete a folder with its subdirectories and files due to the "Access Denied" issue. It's great that you managed to find a workaround using command-line tools. However, the behavior you described can be confusing. Let's break down the steps you followed and address the issues you encountered:
1. Access Denied Issue:
- When trying to delete the folder, subdirectories, and files, the "Access Denied" message indicated a permissions issue. This commonly occurs when the current user does not have sufficient permissions to modify or delete the files.

2. Ownership Issues:
- In Windows, changing the ownership of a file or folder can sometimes be a challenge, especially when dealing with system files or files from a different user account.
- Using tools like TAKEOWN.EXE is a good approach to force ownership changes. The /r /a switches are correct for taking ownership recursively and for all files and subdirectories.

3. Verification of Ownership:
- The DIR /Q command in CMD displays the owner of files. It seems that even after setting the ownership, the owner was still displayed as "..." which indicates a problem with displaying the owner information correctly.
- Rebooting in Safe Mode might have refreshed the ownership information and correctly displayed your administrator name as the owner.

4. Deletion in Safe Mode:
- Deleting the subdirectory successfully in Safe Mode with Command Prompt suggests that there might have been some system process holding onto the files in normal mode, preventing deletion.
5. Final Thoughts:
- It's common for ownership and permissions issues to be more easily resolved in Safe Mode due to minimal processes running.
- Command-line tools like TAKEOWN.EXE and ICACLS are powerful for managing permissions and ownership.
It's great to hear that you were able to overcome the challenges and learn new DOS commands in the process. If you encounter similar issues in the future, starting with Safe Mode or using command-line tools can often provide a solution. If you have any more questions or need further assistance, feel free to ask!
 


Solution
Back
Top