Page 1 of 1

[9.21a] Cant delete a user-readonly folder with junction

Posted: 2019-01-28, 15:11 UTC
by MVV
Steps to reproduce:
1. Start non-elevated TC (I use 32-bit one under Windows 7x64).
2. Create a folder TEST and put some junction into it.
3. Edit folder permissions: disable inheritance, set read and execute for current user and full access for administrators.
4. Try to delete folder. TC warns about non-empty folder, confirm.
5. TC reports an error during deletion, try to repeat some times, no luck. No elevation is requested.
6. Create some empty subfolder in TEST folder and try to delete TEST folder again.
7. TC warns about non-empty folder, confirm. TC shows error dialog for created subfolder with skip-retry-ignore-elevate-cancel buttons. Press either As administrator or All as administrator, no matter.
8. TC have deleted empty folder but couldn't delete junction, so situation repeats from step 5.

Re: [9.21a] Cant delete a user-readonly folder with junction

Posted: 2019-07-01, 13:11 UTC
by ghisler(Author)
I have tried this, but TC deletes the junction and the folder just fine. How did you create the junction? I used a button:
Command: cmd.exe
Parameters: /C mklink %T%N %P%N

Maybe it's different on Windows 10?

Re: [9.21a] Cant delete a user-readonly folder with junction

Posted: 2019-07-08, 12:32 UTC
by MVV
Well, I've tested it in Windows 10, I see skip-retry-ignore-elevate-cancel dialog for TEST folder, but when I press Elevate and confirm elevation, TC fails to delete folder and shows same skip-retry-ignore-elevate-cancel dialog again...

But if I try to delete junction first, TC asks for elevation and then deletes it, then it asks for elevation for TEST folder and finally deletes it.

I create junctions with my NTLinks Maker tool. Your command makes a symlink, not a junction, you should use mklink /J for junction creation.

Please also check if there are any permissions for Authenticated Users group, this group may give more rights than Users group, for clean test only Users and Administrators should be in ACL, or you can simply create test folder under C:\Program Files folder (so you can skip step 3 because your test folder will get proper permissions).

Re: [9.21a] Cant delete a user-readonly folder with junction

Posted: 2019-07-08, 19:48 UTC
by ghisler(Author)
Can you please describe exactly how you create the junction with NTLinks Maker, and where I can get it? totalcmd.net seems to be down.

Re: [9.21a] Cant delete a user-readonly folder with junction

Posted: 2019-07-10, 17:20 UTC
by MVV
You can create it with mklink too, just use /J switch. Or you can use NTLinksMaker_1.4.0.402 from e.g. button/usercommand with parameters /r="%P" "@%WL" "%T" (creating junctions is the default setting).