Overwrite dialog may not appear for elevated copying

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Overwrite dialog may not appear for elevated copying

Post by *DrShark »

Christian Ghisler is aware of the issue, but it won't be fixed soon (TC 9.20 may not get the fix), reason (from email):
Christian Ghisler wrote:There is currently no easy solution to change this, unfortunately.
This post is mainly to warn users.

So, usually when target with same name exists, TC offers overwrite dialog (one with rename/autorename options) before or after the elevation request.
However, sometimes Overwrite dialog doesn't appear, TC shows only elevation request, and after user chooses "As Administrator" TC is just starting overwriting target file.
For example, on Vista it happens for a file c:\Windows\MEMORY.DMP:
on try to copy a MEMORY.DMP file from anywhere to existing c:\Windows\MEMORY.DMP TC will show overwrite dialog,
but on try to copy c:\Windows\MEMORY.DMP to a same-named existing target in a custom location TC will only show an elevation request.

This behavior may also happen on try to copy/move to/from some other folders or files with some kind of NTFS restrictions.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I could no longer reproduce this problem, because I don't have a file c:\Windows\MEMORY.DMP. It doesn't seem to occur with any other files, especially not in protected subdirectories where reading the subdir already needs admin rights...
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

As I mentioned in email, on Vista this also can be reproduced with c:\ProgramData\Microsoft\Windows\WER\ReportQueue\ folder.
Copy there some file, like tc920x32_64_b3.exe.
Then try to copy tc920x32_64_b3.exe from your source dir to ReportQueue\ again - you'll see overwrite dialog.
But if you'll try to copy tc920x32_64_b3.exe from ReportQueue\ to other location where tc920x32_64_b3.exe exists, TC will show elevation dialog instead of overwrite dialog.

For my MEMORY.DMP, I'll check whether applying its NTFS rights to some other file using icacls SDDL file will allow to reproduce the issue. If it will be reproduced here, I'll send to you the SDDL file to try to reproduce this on some random file.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

I tried to apply the MEMORY.DMP rights to a new file using an acl/sddl file, but it didn't restore the rights of SID S-1-16-12288, and also didn't delete the other SIDs/rights of the a new file.

Original MEMORY.DMP has only following rights:

Code: Select all

S-1-5-18:(F)
S-1-5-32-544:(F)
S-1-16-12288:(I)(NW)
But still you can try to reproduce the issue with any file and ReportQueue\ dir as described in above post
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in Total Commander 9.20 beta 4, please check!
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

history920.txt wrote:18.05.18 Fixed: No overwrite confirmation when copying a file which can only be read as administrator (elevated) from a directory which can be read without admin rights (32/64)
In TC 9.20 beta 4, overwrite dialog appears now after pressing "As Administrator" in elevation dialog. Tried on MEMORY.DMP, pkgmgr.log.txt files and ReportQueue folder.

It seems, however, "Auto-rename copied" feature in that overwrite dialog, which appears after elevation confirmation, works only for 1 iteraction. For example, if to copy
c:\ProgramData\Microsoft\Windows\WER\ReportQueue\tc920x32_64_b3.exe to other location for a first time with "Auto-rename copied" option, to target dir where tc920x32_64_b3.exe exists, TC will create "tc920x32_64_b3 (2).exe". Following try to copy "tc920x32_64_b3.exe" from ReportQueue\ to that target won't create "tc920x32_64_b3 (3).exe".
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check it.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

This should be fixed in beta 5, please test it!
Author of Total Commander
https://www.ghisler.com
User avatar
DrShark
Power Member
Power Member
Posts: 1872
Joined: 2006-11-03, 22:26 UTC
Location: Kyiv, 68/262
Contact:

Post by *DrShark »

history920.txt wrote:30.05.18 Fixed: "Auto-rename copied" option not working properly when copying a file which can only be read as administrator (elevated) from a directory which can be read without admin rights (32/64)
I can confirm the fix on Vista 32-bit+TC 9.20 beta 5.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply