Windows 2008R2, drag'n'drop folder on junction

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
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Windows 2008R2, drag'n'drop folder on junction

Post by *wanderer »

On Windows 2008 R2 server, in one of the panels, go to C:\Users, drag a folder (i.e. MyFolder, containing just a couple of files in it) from the other panel and drop it on folder "Default". Now do the same but drop it on folder "Default User" (which is a junction pointing at "Default"). Instead of the folder being copied normally (thus asking you if you wish to overwrite the files), you get a message saying "Error: Directory [MyFolder] not created. Continue? [Yes] No]". I assume it is not logical for this to happen, right? There may be a technical reason but it's not logical from the end-user's point of view.

P.S. I tested this using the admin account and UAC deactivated.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50519
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

TC probably tried to create it under C:\Users\Default User\, but the permissions of this link are set by Windows that no files or folders can be created there. If you follow the link manually, you will not land in C:\Users\Default User\, but you will be redirected to C:\Users\Default\.
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 »

wanderer, there are some junctions that were added by MS for compatibility reasons. E.g. Documents and settings that points to Users, Default User that points to Default etc. Theese junctions are not for end user, they are used only for programs that try to access files using Windows XP-like paths. If you try to see junction's security permissions you'll see that all is forbidden. Explorer even won't open this junction.

Maybe it is a bit strange TC feature but TC tries to read junction target and follow it when you enter such junction. That's why you don't get any error message. But path is changed to junction target - it is not so when you entering normal junction.
Last edited by MVV on 2010-12-01, 15:06 UTC, edited 1 time in total.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

Hmmm. As i said "I tested this using the admin account" and it seems that admins have full access on this folder ("this folder only" security setting).
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

This seems to be pretty complicated and rare. I'm sure there is a logical explanation for it but i'm not sure it's worth searching for it too long.

I tried to copy a folder named "Application Data" containing other folders and files in it, by drag'n'dropping it on to "Default User". "Default user" is a junction and "Application Data" is also a junction so i guess there is an issue in this kind of situations. If you feel you wish to research it some more, please do so otherwise i don't think it's that important.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

You should use direct folders under Windows 7 instead of theese compatibility junctions.

Or you may edit junction's permissions and add corresponding access rights to allow TC to copy/move files into redirected folder.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

MVV wrote:You should use direct folders under Windows 7 instead of theese compatibility junctions.

Or you may edit junction's permissions and add corresponding access rights to allow TC to copy/move files into redirected folder.
It doesn't seem to be a permission issue since i'm logged in as admin and those two folders have full permissions on them. If i try to perform the same operation with another folder (the source folder i mean), it works just fine. The "junction in junction" thing seems to have a problem...
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 50519
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

No, please have a look at the junctions, they really have strange permissions: You are allowed to read the junction target, but you aren't allowed to write to the junction folder itself (but to the folder to which it links).
Author of Total Commander
https://www.ghisler.com
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

ghisler(Author) wrote:No, please have a look at the junctions, they really have strange permissions
They have the default permissions. I haven't touched anything permission-related. In all folders and junctions, administrators have full permissions. The only thing that's different is that in the "Default user" junction, all permissions are on "this folder only". I guess this may be causing this behavior because the same issue happens in Windows explorer too, so it does not seem to be a bug.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
petermad
Power Member
Power Member
Posts: 16031
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Post by *petermad »

2wanderer

For these Windows 7 system junctions you will notice, if you go into the Advanced section of the Security settings, that "Showing the folder" is "Declined" for "ALL" users, for current folder only - and that overrides administrator rights.

The words in quotes above might be different - I have translated them from Danish.

TC follows these system junctions, but Explorer (mine at least) gives an error if you try to follow system junctinos except for the junction "c:\Users\All Users"
License #524 (1994)
Danish Total Commander Translator
TC 11.51 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1391a
TC 3.60b4 on Android 6, 13, 14
TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
MVV
Power Member
Power Member
Posts: 8711
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

wanderer, as I said, theese junctions are not for end user. Users\Default User is one of them. And they have special permissions that are not inherited from parent folder (you may look at them as petermad said). Please note that even if you're logged as administrator you may have no access to some folders/files until you give it for yourself manually. Even regular user can change its own file permissions so admins won't have read access. But admins always may change owner and add corresponding permissions.

I have Windows 7 installed and I don't think that MS changed something for server version - theese junctions are the same since Vista.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

MVV wrote:wanderer, as I said, theese junctions are not for end user.
Well, i don't agree with that statement. As you said earlier:
MVV wrote:Theese junctions are not for end user, they are used only for programs that try to access files using Windows XP-like paths.
TC is such a program. It shouldn't matter that its user manually performs some operations using these junctions. Everything should work properly in all programs and all situations. Apparently though, "properly" means one thing in WinXP and something else in Win7 because of different OS philosophies.
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
User avatar
wanderer
Power Member
Power Member
Posts: 1640
Joined: 2003-03-28, 14:35 UTC
Location: Sol

Post by *wanderer »

petermad wrote:"Showing the folder" is "Declined" for "ALL" users, for current folder only - and that overrides administrator rights.
Hmmm, i hadn't noticed that.
petermad wrote:TC follows these system junctions, but Explorer (mine at least) gives an error if you try to follow system junctinos except for the junction "c:\Users\All Users"
It seems here that TC reads and translates the junction and then uses the permissions of the junction's target to read the target folder. Windows Explorer probably also reads the junction permissions before doing that. Perhaps TC should do the same thing too. It wouldn't be convenient but it would probably be more proper, security-wise.

Christian, any thoughts on that?
- Wanderer -

¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯
Normally using latest TC on:
x32: WinXPx32 SP3 (very rarely nowadays).
x64: Clients/Servers - Win10/Win11 and Win2K16 to Win2K22, mainly Win10 though.
Post Reply