View or copy files as normal user by becoming Admin.

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
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

View or copy files as normal user by becoming Admin.

Post by *JFierce7 »

Hi,

TC 7 does a good job by offering to do things as Administrator, for instance deleting or moving files. This even works when entering directories that are for Administrator only, last not least Administrator's user directory.
Unfortunately this option is not available when reading files - for viewing and copying and maybe other occasions. Any operation on Administrator's files without additional ACLs fails with error.
So please add Administrator access for files!

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

Post by *ghisler(Author) »

Copying and moving such files will indeed work, but viewing or editing will NOT work. Why?

- Viewing cannot work because Lister is part of TC, not part of the background program which performs the operation. There are 3 possible ways to solve this problem:
1. Pass ReadFile calls to the background program. Downside: wouldn't work with lister plugins
2. Copy the viewed file to TEMP before viewing it. Downside: very slow for large files
3. Set the necessary access rights (ACL) to allow the user to access the file. Downside: The file will remain accessible, so the user separation is defeated.

- Editing doesn't work, because the editor doesn't have the rights to access the file. Solution: Create a button with the
Command:
C:\WINNT\system32\runas.exe /user:yourcomputername\Administrator
Parameters: notepad.exe %P%N

Maybe someone has an idea how this could be solved in a better way?
Author of Total Commander
https://www.ghisler.com
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

ghisler(Author) wrote:Copying and moving such files will indeed work,
Fine! Please do it! :D It would be just consistent.
3. Set the necessary access rights (ACL) to allow the user to access the file. Downside: The file will remain accessible, so the user separation is defeated.
Hmmm, for my purposes it would suffice to *ask* the user whether the ACL should be changed and then do that permanently.

There may be other options.
JFierce7
Senior Member
Senior Member
Posts: 212
Joined: 2005-07-17, 10:47 UTC

Post by *JFierce7 »

BTW, taking ownership of files or directories (cm_EditOwnerInfo) doesn't work as non-administrator (it doesn't ask for Administrator rights). I would say this is a related bug, so I'm posting here instead of opening another new report.
Post Reply