BTM, F5/F6-F2: no copy/move to restricted access dir

The behaviour described in the bug report is either by design, or would be far too complex/time-consuming to be changed

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:

BTM, F5/F6-F2: no copy/move to restricted access dir

Post by *DrShark »

To reproduce:
0) start TC with normal (not elevated) rights;
1) in one panel open a folder with restricted access (copy/move to it requires elevation). I tried with
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\
2) try copy or move files from opposite panel to such folder using either
Background Transfer Manager
(select files to copy/move, then open Commands->Backround Transfer Manager...->+->Add selected [for mopying or for moving], confirm target path)
or background copy
(select files to copy/move->press F5-> press F2).
Results:
1. There will be no elevation request. Instead, error will appear:

Code: Select all

---------------------------
Total Commander
---------------------------
The given target path
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\
is invalid!
---------------------------
ОК   
---------------------------
Files won't be copied/moved.
2. Only for background copy (F5-F2):
after closing of the above error message, moving mouse over main Total Commander menu (Files, Mark etc...) will make font of its menu items grey and blurry.
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) »

Indeed this isn't currently supported. The idea is that the BTM should work with very little user interaction.
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 »

ghisler(Author) wrote:Indeed this isn't currently supported. The idea is that the BTM should work with very little user interaction.
Here we still have iteraction with Error dialog, which IMHO is not a significant difference with pressing "As Administrator" in a normal copy confirmation dialog.
Even if currently there are no plans to change current BTM behavior anyway, please at least look at what happens with menus font (see result #2 in 1st post.)
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 »

history920.txt wrote:09.04.18 Fixed: Couldn't copy to certain directories with F5-F2, e.g. to C:\ProgramData\Microsoft\Windows\WER\ReportQueue\, because SetCurrentDirectory failed (32/64)
This one has been fixed, what this topic is doing in "Behaviour which will not be changed" subforum?
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 moved it here because I couldn't fix all possible problems with this folder, e.g. when using subst'ed drives.
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 »

Well, "subst'ed drives" is quite a separate (although related) story.

Yes, it's true that if e.g.
C:\ProgramData\Microsoft\Windows\WER\ReportQueue\
will have e.g. NT AUTHORITY\WRITE RESTRICTED:(CI)(AD) NTFS rights (which is a case on Vista), and this path is used for subst'ed drive, a copy to such drive will fail. But the fix wasn't about subst'ed drive.

BTW, in email you wrote that because of this issue, and other issues caused by NTFS rights, you decided not to add full feature support for subst'ed drives, because "...There are just too many locations I would have to change, and too much which can go wrong". What do you think of adding such support enabled by new separate internal command, so it won't touch default TC behavior?
Last edited by DrShark on 2018-05-07, 15:27 UTC, edited 1 time in total.
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) »

The problem is that the elevated processes cannot see the substed drive. Therefore I would have to replace it by it target in many many locations, which is just not feasible.
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 »

ghisler(Author) wrote:Therefore I would have to replace it by it target in many many locations, which is just not feasible.
Well, for user's subst'ed drives you can start with less complex TC parts, like Lister (e.g. to solve the issue with pkgmgr.log.txt you confirmed in email). For more complex parts, like copying with elevation, maybe you can try to make it on FS-plugin part (plugin will do all the complex stuff so you won't break TC code)?
ghisler(Author) wrote:The problem is that the elevated processes cannot see the substed drive.
Maybe it will be then easier at first to add support for elevated subst'ed drives - TCADMIN will see them, you only need to show them in drive list too.
Donate for Ukraine to help stop Russian invasion!
Ukraine's National Bank special bank account:
UA843000010000000047330992708
Post Reply