Posted on 01/09/2023 4:04:27 PM PST by entropy12
Easiest method to get rid of annoying "Access Denied" error messages while copying, moving or deleting files and folders.
Open command prompt as administrator, enter following 2 commands, substitute z:xxxxxxxx with name of your folder in which the problem exists. For example substitute z:xxxxxxx with D:\TOPFOLD as name of folder. Note spaces in command lines.
takeown /f z:xxxxxxx /r /d y
icacls z:xxxxxxx /grant administrators:F /T
The result will be all folders and files inside and below folder D:/TOPFOLD will be recursively assigned to you as logged in user, with all permissions granted. No more "Acess Denied" errors.
You can also fix just 1 file with this procedure.
Simply use address of problem file instead of folder as shown in example. For example D:\TOPFOLD\mylist.txt
BKMK - Thanks.
Get Windows 7. XP also works just fine.
Do I assume correctly that these admin cmd lines are on the machine which I wish to access?
I had a HD crash about 2 wks ago and lost access to my D drive (W10) from my laptop (W11).
Been searching everywhere for how to regain it. Tried several work arounds, but nothing works.
If this works for me, man, are you a lifesaver.
Linux
I didn’t know that! Thanks for posting. 😁
Since I am the only one on my computers, I turn off most of the stuff in the Windows UAC (User Access Control).
“Linux”
I looked on Google store and that app is not available.
I've been in Windows since 3.0, so it's familiar and often familiarly frustrating.
I realize I need to work with Linux to get it, but I've not gotten even basics.
Any suggestions on a good starting point?
You have to get the drive mounted first. You can't run commands on an unmounted drive.
https://www.diskpart.com/windows-10/d-drive-missing-windows-10-3889.html
Use your own computer, not a stranger’s... /s
You don't mention your distro. For transitioning away from Windows, try Mint Cinnamon.
Boot from that USB stick, and you'll get an option to try without installing the Linux OS.
You should be able to use the File Explorer while you're in the trial Linux to look at your Win 10 drive [the drive might already be mounted, as TChad talks about in post #11].
I've done that in the past to transfer files from a belly-up Win OS to safety.
The two tools in the Forbes article:
I have a ton of my own programs to help me trade stocks, written for Windows. Windows is very good and has more software available than all other systems combined. But it a complex system and one has to be a little bit computer savvy.
Linux etc are fine if all you do is surf the net and do not have ability to write your own code for things you do in life.
I have used Windows 7 for many years. Windows 10 has updates for viruses and intrusions, so less vulnerable than Windows 7.
For the computer you started with, you are the administrator.
If you have a new HD, partition it for a new drive called D:
The 2 line code I presented is when sometimes ownership of a folder or file, for some unknown reason is no longer yours. I had a folder owned by “TRUSTED INSTALLER” instead of me. And it kept giving me Access denied errors when I tried to copy or move the files inside the folder.
Haha I only use my own computers. Windows is known to mess up with ownership of folders during updates.
Tchad is entirely correct. Use Diskpart utility to partition the hard drive first. Then if you run into “Acess Denied” errors, is where my 2 line code will help fix that..
Disclaimer: Opinions posted on Free Republic are those of the individual posters and do not necessarily represent the opinion of Free Republic or its management. All materials posted herein are protected by copyright law and the exemption for fair use of copyrighted works.