[SOLVED] Can't take control of some files and directories

texinwien

Honorable
Jul 14, 2015
3
0
10,510
This is long, because I have tried a number of things without success, but the summary is that I am unable to take control of some directories and their contents on a drive that belongs to me and that is installed in a system that belongs to me.

OS: Windows 10 Professional, latest build
AV: BitDefender Total (latest build and virus database)
Software: I use Carbonite Backup to keep some of the files in this drive backed up remotely. I mention that in case it's relevant (e.g. Carbonite Backup might have some special hold on the files and folders).
System: I custom built this private system and have added new drives to increase storage capacity. As part of adding new drives, I have manually moved the entire contents of some drives to newer, bigger drives. After recently moving the contents of one drive to another, I am not able to take control of most (maybe all) of the files in their new location.
Users: I have a normal, non admin user that I usually log in with. I have a separate admin user. I have also temporarily added my normal user to the Admins group, since Windows 10 indicates the files and folders belong to my normal user.

For some history, some months ago, I had started to prepare to migrate my Windows installation to a faster drive on this PC. I moved some files and folders around at this time, but got distracted and left things in an unfinished state.

Over the past months, I have installed a few large games and downloaded many images and videos from my digital camera. The destination drive for these items was getting full, so I decided to move the stuff to a bigger drive. I moved the files via the Windows interface, and this seemed to have worked without error. The folders included, at the root, a 'Users' folder that had separate subfolders for different users, and under each of those folders were 'Documents' and other standard folders.

The first time I noticed an issue is when I played the Hades game, and it was unable to save my game files, which are located on the larger drive under the Users/MyUser hierarchy. When trying to fix that, I realized that I was able to create files in folders on this drive, but I am not allowed to delete them.

The file and folder properties dialogs for the files on this drive show that a user with the same name as my normal user is the owner of the files, but if I tried to delete one of these files with my normal user, I was presented with a UAC dialog, first. When I tried to authorize the deletion by providing the admin user's password in this dialog, I was presented with an 'Access Denied' error. I made my normal user a member of the Admins group, but still get 'Access Denied' errors when I try to delete any of these files.

In the Access Control properties dialogs for these files and folders, I'm unable to make any changes. All options are grayed out, no matter which user I am logged in with.

I have also tried disabling BitDefender, but that doesn't seem to have any affect.

I then tried to run takeown and icacls, recursively, both as my normal user (now part of the Admins group) and as my original admin user. Both of these failed, even with BitDefender disabled.

Next I logged in to Safe Mode with command line interface and ran takeown, followed by icacls, recursively. The CLI indicated that both had succeeded, with the exception that icacls reported it had failed on one file or folder (it didn't report which one).

I was hopeful this had fixed the problem, but when I logged into Windows normally, I was faced with the exact same behavior with these files and folders - all options in Access Control dialogs were grayed out, and I was still unable to delete any files in the target folders.

As I mentioned above, this is my private system and my private disk drive. I just need to make sure my normal user has full control over the files in the folder, but nothing I have tried so far has done the trick. I also don't want to lose these files, because they include ~15 years worth of digital photo archives.

Edit: Maybe related - I am not able to cd into this larger drive ( E: ) from the command line with any user. I don't get an error message, but cd E: has no effect. I stay in the directory I was already in.
 
Last edited:
Solution
The file and folder properties dialogs for the files on this drive show that a user with the same name as my normal user is the owner of the files, but if I tried to delete one of these files with my normal user, I was presented with a UAC dialog, first. When I tried to authorize the deletion by providing the admin user's password in this dialog, I was presented with an 'Access Denied' error. I made my normal user a member of the Admins group, but still get 'Access Denied' errors when I try to delete any of these files.
So you moved the user folder? what remained in the Users/MyUsername/ folder?

registry uses the user folder to find out what permissions you have. If you moved everything in there for all users, none of them can...

USAFRet

Titan
Moderator
If I understand correctly, you moved the /Users/ folder to a different drive?

Moving that is almost never a good idea.
It needs to stay with the OS, for reasons just like this.

You can save files wherever you choose.
You can redirect the Libraries.

But moving the whole /User/ folder to elsewhere usually does not work well. There are many other things in there beside /Documents/, and the OS and your applications are expecting those things to be in the typical location.
 

texinwien

Honorable
Jul 14, 2015
3
0
10,510
More detail is needed here. You're right that it's not a good idea to just move the Users directory via the standard filesystem interface, but you can configure Windows to expect the Users directory to be on a drive other than the one that hosts the OS.

I did that earlier in 2020, and it worked fine, but I think you're right that I screwed things up by then moving the folder from its new location to a different drive via the filesystem interface recently. This was boneheaded of me, for sure, but my memory of where I'd left things when preparing to move the OS earlier last year was fuzzy, and I just borked this. Also, I have been using an employer-supplied Mac for work for the past few years, and am just out of practice with Windows :S

Interestingly, the PC seems to work just fine for most applications right now, so it's not completely hosed. Now I'm just trying to figure out how to recover from the current, semi broken state.
 
Last edited:

Colif

Win 11 Master
Moderator
You can use symbolic links or Junctions to put the folders elsewhere, I expect that is how you did it first time. Not saying its a fix now, just saying how you could have done it.

You also don't own every file/folder on PC. Some windows users have more access than you do, as its how windows works. System & TrustedInstaller will own files on PC and its inadvisable to take ownership of them unless you like reinstalling windows again. Windows can't work without these users as they do tasks for you. I expect the Users folder is one such folder. No user owns it... except maybe System. it would be used constantly by registry to check if you have the ability to do anything.
 

texinwien

Honorable
Jul 14, 2015
3
0
10,510
I'm familiar with the TrustedInstaller and System users, and am not interested in taking control of files that SHOULD belong to them. However, I am currently unable to delete ANY files on this drive, including ones in my Users/MyUsername/Documents folder. This includes files that I copied over as well as junk files that I created so I could see what actions I was allowed to perform in this folder. I can create new files here, but I can't delete or rename them. It's super frustrating.
 

Colif

Win 11 Master
Moderator
The file and folder properties dialogs for the files on this drive show that a user with the same name as my normal user is the owner of the files, but if I tried to delete one of these files with my normal user, I was presented with a UAC dialog, first. When I tried to authorize the deletion by providing the admin user's password in this dialog, I was presented with an 'Access Denied' error. I made my normal user a member of the Admins group, but still get 'Access Denied' errors when I try to delete any of these files.
So you moved the user folder? what remained in the Users/MyUsername/ folder?

registry uses the user folder to find out what permissions you have. If you moved everything in there for all users, none of them can likely delete files on that drive. As the files the registry is looking for aren't there.

That is a guess. But then if that were case, its amazing you have any rights.

Something is wrong and I think only place you would fix it is registry but I don't know that place well enough to offer suggestions. Ok, I have 1 suggestion... back it up before making any changes.
 
Solution