"As Administrator" not working with remote server

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
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

"As Administrator" not working with remote server

Post by *StatusQuo »

TC 7.50b2 (also in older versions), tested in XP SP3:

Copying/moving "As Administrator" fails when copying from a remote server (source),
where the entered (local) administrator account data is not valid (read access seems to fail then).
It only works, if the entered login data is valid for both source and target locations.

Expected behaviour:
If the current access rights are sufficient for reading, the entered Administrator login data should only be used for target access,
not for reading the source (where it is not needed and maybe not valid at all).

Example:
A NAS (Samba, source for copying) has a user account named "NAS_user" for read/write access, but no "Administrator" account.
The local machine with running TC has "User" and "Administrator" accounts, but none called "NAS_user".

Now, locally logged in as (normal/restricted) "User", try to copy data from the NAS to e.g. local windows directory (where "User" has no write access), using "(All) As Administrator" button in the popping up TC dialog - this will fail, the files are not copied.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately what you write is impossible: When copying as admin, TC starts a special tool (tcmadmin.exe) as admin and then tells that tool to copy the file with CopyFileEx. Therefore the admin must have read rights to the source, and write rights to the target. It's not possible to copy the file if the user has rights to one side and none to the other, and the admin has rights to the other side but not to the first.
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

I see, thanks for explaining.

As workaround I currently start a TC instance as Administrator using runas.exe. This way different account infos for the NAS can be entered in a windows standard dialog when first accessing it (via UNC path).

I was hoping that something like this standard windows dialog would be possible using tcmadmin.exe, too, after access fails with current user data.
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Well, I thought about making tcmadmin.exe ask for the network password and make the connection, but this would be quite confusing for the user...
Author of Total Commander
https://www.ghisler.com
StatusQuo
Power Member
Power Member
Posts: 1524
Joined: 2007-01-17, 21:36 UTC
Location: Germany

Post by *StatusQuo »

So if this is intended, this issue is more a feature wish. After sleeping it over:
I think I would not be disturbed by the additional dialog in general (like TC's normal access uses it), if this is possible.

Probably it would get annoying, if it pops up on every call to "As Administrator" - although this may be better than no access at all.

TC currently remembers the Administrator password for some time. Maybe network passwords can be stored in a similar way for a limited time?
Who the hell is General Failure, and why is he reading my disk?
-- TC starter menu: Fast yet descriptive command access!
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Network connections would remain active once connected this way, at least as long as tcmadmin keeps running. So it may indeed be a good idea to add this...
Author of Total Commander
https://www.ghisler.com
Evds
Junior Member
Junior Member
Posts: 90
Joined: 2009-06-10, 11:09 UTC

Post by *Evds »

When i try to copy files from a directory that was opened "as administrator" to a directory on a ftp server i get the message: "Error: Cannot read <the name of the file>"

Is this a simular problem ?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It's similar: The ftp client cannot read from admin-only directories. The same is also true for plugins and many other functions in TC.
Author of Total Commander
https://www.ghisler.com
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48088
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Sorry, for the moment I have to move this to "will not be changed". It's just postponed for the moment.
Author of Total Commander
https://www.ghisler.com
Post Reply