VHD mounted drives and <LNK> directories

Please report only one bug per message!

Moderators: Hacker, Stefan2, white, sheep

Post Reply
User avatar
Blight
Junior Member
Junior Member
Posts: 55
Joined: 2003-03-22, 23:04 UTC

VHD mounted drives and <LNK> directories

Post by *Blight » 2012-01-19, 21:10 UTC

Hi,
When mounting a VHD drive image created using windows 7's 'Backup & Restore' using Windows 7 'disk management' tool, it's impossible to navigate <LNK> folders.

For example, if the mounted drive resides on "I:\", navigating to "I:\Users\Blight\My Documents", opens up "C:\Users\Blight\My Documents".

This is not the case when navigating through explorer.

My concern about this bug is the potential for erasing the wrong files by accident.
Yaron Gur
Zoom Player . Lead Developer

User avatar
HolgerK
Power Member
Power Member
Posts: 4937
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK » 2012-01-19, 22:47 UTC

Related problem:Accessing remote server junctions/hardlinks(meanwhile fixed)

BTW:
opens up "C:\Users\Blight\My Documents"
Isn't it "C:\Users\Blight\Documents"?

BTW2:
There must be a reason for
"Configuration->Options->Display: [x] show hidden/system files(for experts only!)" :wink:

Regards
Holger

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

Post by *ghisler(Author) » 2012-01-20, 13:43 UTC

Unfortunately paths are stored with absolute locations in LNK files, so the drive C is hard coded. Unfortunately Total Commander cannot know whether such a hard-coded link is wrong or not. It seems that the Explorer makes some assumptions because the user mounts the drive within Explorer.
Author of Total Commander
http://www.ghisler.com

User avatar
Blight
Junior Member
Junior Member
Posts: 55
Joined: 2003-03-22, 23:04 UTC

Post by *Blight » 2012-01-25, 22:31 UTC

ghisler:
Then you may want to add these assumptions to TC.
Otherwise TC can cause massive systemic data loss if a user decides to delete a directory containing such links.
Yaron Gur
Zoom Player . Lead Developer

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

Post by *MVV » 2012-01-26, 05:58 UTC

Blight, when you delete folder with links, NO DATA BEHIND LINKS is deleted, just link is removed.

Also, there may be simply no way to ask Explorer about such assumptions.

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

Post by *ghisler(Author) » 2012-01-26, 15:30 UTC

Also, there may be simply no way to ask Explorer about such assumptions.
So far I didn't find any. Also users may actually WANT to have hard links to other drives or sub-trees. For example, I have such a link to move some large files from drive C: (small SSD) to drive F: (Terabyte harddisk) and let Windows still assume that it's on drive C:.
Author of Total Commander
http://www.ghisler.com

User avatar
HolgerK
Power Member
Power Member
Posts: 4937
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK » 2012-01-26, 20:31 UTC

ghisler(Author) wrote:
Also, there may be simply no way to ask Explorer about such assumptions.
So far I didn't find any. Also users may actually WANT to have hard links to other drives or sub-trees. For example, I have such a link to move some large files from drive C: (small SSD) to drive F: (Terabyte harddisk) and let Windows still assume that it's on drive C:.
See
http://support.microsoft.com/kb/930128 wrote:By default, a junction point has the following settings after you upgrade Windows XP to Windows Vista:

The attribute of a junction point is hidden.
The Read permission of a junction point is Deny.
My windows 7 installation was a clean installation (no update) but shows the same access rights

Code: Select all

C:\Users\USERNAME>CACLS "My Documents"
C:\Users\USERNAME\My Documents Everyone:(DENY)(special access:)
                                      FILE_READ_DATA]

                             NT AUTHORITY\SYSTEM:(OI)(CI)(ID)F
                             BUILTIN\Administrators:(OI)(CI)(ID)F
                             COMPUTERNAME\USERNAME:(OI)(CI)(ID)F
So this seems to be generally true for the XP compatibilty links in Vista and Windows 7.

I guess a link created by the user neither has the hidden/system attribute nor this special permission for Everyone.
On the other side: some (TC) users are used to use the XP compatibility links, to navigate to some places.
Maybe it's a good idea to detect whether the link location is on the same drive as the link target.

By the way: it would be nice to have an option to hide this kind of compatibility junctions separately from "show system/hidden files" option.
Currently I'm using the ignore list here to get a clearer look to the file system structure.

Regards
Holger

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

Post by *MVV » 2012-01-27, 05:55 UTC

HolgerK, many users edit permissions of that symlinks, so it is a bad idea to detect them in such way.

User avatar
HolgerK
Power Member
Power Member
Posts: 4937
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK » 2012-01-27, 09:14 UTC

The question was not what many users are doing against the (security) concepts of windows (someone may enter format c:\ as well) but how explorer prevents the normal user to harm his local data.

Regards
Holger

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

Post by *MVV » 2012-01-27, 10:33 UTC

I think it uses constant list of links (it knows 'em all), but it is a question where it holds information about volumes.

User avatar
HolgerK
Power Member
Power Member
Posts: 4937
Joined: 2006-01-26, 22:15 UTC
Location: Europe, Aachen

Post by *HolgerK » 2012-01-27, 12:37 UTC

I doubt this, because the names of the links are different for each language version of the Windows setup.

Regards
Holger

Post Reply