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

Please report only one bug per message!

Moderators: sheep, Hacker, Stefan2, white

Post Reply
User avatar
MVV
Power Member
Power Member
Posts: 8397
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post by *MVV » 2019-01-28, 15:11 UTC

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.

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38190
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2019-07-01, 13:11 UTC

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?
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8397
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post by *MVV » 2019-07-08, 12:32 UTC

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).

User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 38190
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

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

Post by *ghisler(Author) » 2019-07-08, 19:48 UTC

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.
Author of Total Commander
http://www.ghisler.com

User avatar
MVV
Power Member
Power Member
Posts: 8397
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

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

Post by *MVV » 2019-07-10, 17:20 UTC

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).

Post Reply