-Copy problem (permissions, network drive)

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

User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

-Copy problem (permissions, network drive)

Post by *Lefteous »

1. I first tried copying a folder from a network drive (mounted into drive z:) to the program files folder on the local harddisk.
2. The copy failed and shows 'access denied" errors for every single file even when elevating the copy process.

Then I tried solving the problem another way:
1. I copied the folder to the desktop which is writable for the current user
2. Then I copied the folder from the desktop to the program files folder. It worked flawlessly (of course I had to elevate the process).

Any ideas?
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Every user has his/her own network drives - this applies to elevated processes, too. Network drives won't be available in the elevated copy process if you map a network drive as user XY.

Solution: Launch elevated TC instead of elevated copy process and map the network drive (again) and start copying afterwards.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Dalai
Couldn't this be done by the elevated copy process?
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

You are asking the wrong guy ;). I don't know if it's possible and how much effort it would be to implement it this way.
I see two "handicaps" here (in case of unavailable elevation at least):
  • think of network shares that are limited to some users only.
  • think of network shares that require a (different) password to successfully map/login to.
So I don't think it's as easy as it sounds. But I will leave that decision to Ghisler, of course :).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Dalai
What I don't understand is - why exactly is the elevated process unable to access the network drive? This should be the same user. For me it seems as if some elements of the user are not copied to the elevated process.


And of course I'm expecting a solution from Christian - but if you could help - even better! :-)
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Lefteous wrote:What I don't understand is - why exactly is the elevated process unable to access the network drive? This should be the same user.
It is the same user name but with a different security token, so for Windows it's a completely different user with a different security context - and own network drives. That's not TC's fault, you can blame MS for this. I don't know if it was a design decision, but maybe they had some security concerns in mind (I don't know if there are any).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

2Dalai
Yes and why isn't it possible to copy all this stuff to the elevated user?
User avatar
Dalai
Power Member
Power Member
Posts: 9966
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Post by *Dalai »

Well, it should be possible, but as I pointed out it might not be that helpful in some situations.

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Why is this thread marked as not a bug?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Because it's not TC's fault: The network drive is only accessible by the normal user, and the protexted directory only by the elevated user, but none of them by the same user. Therefore it's not possible to copy files directly between these two locations.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Explorer is able to do this job without problems (of course requires elevation). Why not TC?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50541
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Explorer changes files and folder permissions to do that - which is a bad idea because it defies the idea of protected folders.
Author of Total Commander
https://www.ghisler.com
User avatar
Lefteous
Power Member
Power Member
Posts: 9537
Joined: 2003-02-09, 01:18 UTC
Location: Germany
Contact:

Post by *Lefteous »

Yes changing permissions might not be a good idea. What about a two step process? Copy files to a local temp dir and then move them to the protected location?
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

It would be faster to send files between TC and TCMADMIN through memory...
User avatar
MarcinW
Power Member
Power Member
Posts: 852
Joined: 2012-01-23, 15:58 UTC
Location: Poland

Post by *MarcinW »

...or even better - TC probably could create a file mapping and send the handle of this mapping to the TCMADMIN...
Post Reply