Problem when accessing another user's folder

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

Moderators: Hacker, petermad, Stefan2, white

Post Reply
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Problem when accessing another user's folder

Post by *MarcinW »

This behavior applies to Windows 2003/XP and older (NT family). To reproduce:
- create folder "C:\Test1" with access rights for - and only for - user "User1",
- create folder "C:\Test2" with access rights for - and only for - user "User2".

Test1:
a) Try going into "C:\Test1": TC shows "Access denied" dialog, so press "As Administrator" button, enter user name "User1" and his password. You are inside "C:\Test1" now.
b) Now go back and try going into "C:\Test2": TC shows "Access denied" dialog, so press "As Administrator" button - nothing happens.

Test2 - only Windows 2000, under Windows XP works properly:
a) Restart TC (to forget password entered in Test 1).
b) Try going into "C:\Test1": TC shows "Access denied" dialog, so press "As Administrator" button, enter user name "User1" and invalid password. Now you are unable to go into neither "C:\Test1" nor "C:\Test2" anymore (without restarting TC).

It seems that solution to these problems is quite simple: if going into folder fails, TC should clear buffered user name and password and ask the user again.

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

Post by *MVV »

When you do some operation as admin, TC starts TCMADMIN and keeps it running for some time (this time may be set in wincmd.ini), and passes all admin operations to this TCMADMIN instance.

It would be nice though to be able to close this TCMADMIN and start new one with another credentials on error.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50549
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Indeed you cann't currently open multiple tcmadmin commands with different credentials. You need to close and restart TC. There are some TC restarter tools which you can put on the button bar, e.g. this one:
http://www.totalcmd.net/plugring/tinnytcrestarter.html
Author of Total Commander
https://www.ghisler.com
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

ghisler,
But maybe you can change it? Ask for new credentials on error and then close existing and start new TCMADMIN... There's no need to start multiple TCMADMINs, just close running one (or leave unattended until it closes itself) and start new one.
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

BTW, when we kill tcmadmin.exe manually from task manager, TC doesn't notice this and all subsequent operations with tcmadmin fail.

Solution:

Code: Select all

  if WaitForSingleObject(ProcessInformation.hProcess,0) = WAIT_OBJECT_0 then
    ... process terminated ...
  else
    ... process alive ...
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

This only needs to be checked when there is no response from TCMADMIN via pipe.
Post Reply