Help needed to delete an "inaccessible" folder in win10-64, DELL XPS13-9360

peterh337

Honorable
May 5, 2016
155
0
10,690
To cut a long story short, I did a restore from a website using rsync but rsync seems to do something on win10 which it doesn't do on anything earlier, namely it writes the folders and files with some mix of privileges which nothing I have tried can get around. The well worn route of "taking ownership" etc just takes you in circles saying access is denied, whatever I do. I am an Administrator of course... but on windoze that means very little.

It is not a case of some process grabbing the folder. I can rename it ok, and have done so. So I could just forget about it... except that it is taking up 40GB - it contains many thousands of files. If it was just a rogue process holding it, that can be solved with tools like Unlocker which delete on boot. I have tried that... Unlocker says it was deleted successfully!

I found out the rsync issue with this
https://stackoverflow.com/questions/36723288/rsync-on-windows-cannot-access-copied-folders
and sure enough adding the --chmod command to rsync now writes the stuff nicely. But I still need to delete that inaccessible folder.

At times past, winXP, I was able to boot from a Ubuntu DVD and delete anything like this. But this XPS13 is all secure and moreover the SATA controller appears as RAID, so you are doubly screwed.

Is there some way to do this? I would really appreciate any advice or would pay for it.
 

peterh337

Honorable
May 5, 2016
155
0
10,690
I had a look at windirstat and it doesn't seem to have any capability to clear out a privilege issue.
The command prompt I know (I am ex CP/M and DOS assembler + C programmer) but how would that help? Is it possible to run the chmod command on a directory tree?
 

peterh337

Honorable
May 5, 2016
155
0
10,690
When I try to change any of the access privileges I get

An error occurred while applying security information to:
[pathname]
Failed to enumerate objects in the container. Access is denied.

and that is despite the Owner showing as

Administrator (PETER-XPS13\Administrator)

which is me.

Hence all the solutions found with google don't work because it always comes back to the same message.
 

peterh337

Honorable
May 5, 2016
155
0
10,690
Update: I solved it. I am not sure what I did that worked, but the issue was different on different directories in the tree. Some were showing incorrectly ordered permissions, others had "Deny" for Peter. There was no way to fix the incorrectly ordered permissions but gradually by sorting out the Deny cases I managed to clear it all out.

The key thing was the discovery that one has to start at the lowest level directories, not the root of the "problem" tree. I found that most of them didn't have an Owner, and changing that to Peter made it possible to delete them. As I did more and more of them, the problem shrank rapidly and eventually I was able to delete large chunks of the tree, including one branch which alone was taking up 20GB.

Later I ended up with directories which had the incorrectly ordered permissions and on some of them I found Peter had the Deny next to it, so fixing that enabled those to be deleted.

I suspect the issue could not have been solved from the root, unless one had a tool which could process a whole tree. But it looked like Windows could not get into a lot of the directories at all.

There ought to be a program for doing this, because judging from what turns up on google so many people tear their hair out.

It's amazing that rsync could have made such a mess. The same rsync batch file worked faultlessly for years on win2000, winXP, win7-64. It is win10-64 which got messed up.

 


Did you just try deleting, perm not to recycle bin, from windirstat. I was thinking that you had experience, was thinking that the command prompt may not be aware of whatever was blocking the deletion, and hence would not care, assuming the deletion is something odd.
 

peterh337

Honorable
May 5, 2016
155
0
10,690
The command prompt runs under whatever privilege the desktop runs under, AFAIK.

You can do clever stuff from the command prompt however, such as running the chmod program in cygwin, to sort this out, but you need to know what you are doing. You don't want to do a rm -r or some such :)