copying NTFS encrypted file to network drive

Please report only one bug per message!

Moderators: white, Hacker, petermad, Stefan2

Post Reply
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

copying NTFS encrypted file to network drive

Post by *dami »

I have a bunch of files encrypted by NTFS filesystem. No problem when copying them to another local drive. If the target drive is filesystem not supporting NTFS encryption (like FAT) file is seamlessly decrypted and copied to the target drive.

Problem is with copying to network drive (either mapped as drive letter or accessed by UNC). In that case it seems like TC first creates an empty file in target location with the same filename, only then decrypts source file and starts copying decrypted file to the target location.

Result is a dialog asking whether I want to owerwrite the empty file created on target location with the file I am copying. Quite annoying.

Windows Explorer does not have this issue so I assume it is a bug in TC.

Total Commander 8.01
Windows 7 Enterprise SP 1 Slovak
SMB server of the target location is Windows 2008 R2
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Unfortunately I couldn't reproduce the problem. I don't have access to Windows 2008 R2, so I tried with Windows XP and Windows 8 as target machines (and Windows 7 Pro as the source): There was no error copying an NTFS-encrypted file to any of these systems.

Is there anything special with the machine, e.g. is there some policy which forbids to overwrite files?
Author of Total Commander
https://www.ghisler.com
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

Post by *dami »

After mapping different shares I discovered that the issue appears only in very specific case: Share consisting user's Desktop redirected with Group Policy Folder Redirection. The share must be made available offline.

If Offline files in Windows are turned off, it works OK.

With any other share it works OK.

Even Documents folder redirected the same way (with Folder Redirection) works OK.

I assume there are not many users having mapped this kind of share, using NTFS encryption on local drive and trying to copy among them. :)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Could you post some step by step instructions how to create such a special share? I can then try to recreate it.
Author of Total Commander
https://www.ghisler.com
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

Post by *dami »

We are using Active Directory setting for this (see http://support.microsoft.com/kb/242557), but I think to just change path to the desktop in registry setting might work:
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders

in the "Desktop" key, instead of %USERPROFILE%\Desktop (which I assume is the default setting) I currently have value: \\XYZ.local\SHARENAME\desktop\MYUSERNAME\Desktop

The "XYZ.local" is name of our domain and link to DFS root. The share SHARENAME is also beeing replicated by DFS.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Could you give me more details, like the path of the share to which you try to copy the encrypted files? Is it the same?
\\XYZ.local\SHARENAME\desktop\MYUSERNAME\Desktop
Author of Total Commander
https://www.ghisler.com
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

Post by *dami »

Yes, the path is the same.
It does not matter, whether I switch to the directory by TC's commandline cd \\XYZ.local\SHARENAME\desktop\MYUSERNAME\Desktop
or whether the share \\XYZ.local\SHARENAME\ is mapped as drive and I do cd desktop\MYUSERNAME\Desktop then. The overwrite dialog appers in both cases.

But it only appers on the Desktop folder.

If I try to write to folder one level up (\\XYZ.local\SHARENAME\desktop\MYUSERNAME\) - where I as a user have access - everything works fine.

I have even tried to delete all files from my desktop, suspecting some conflict with desktop.ini or thumbs.db or anything. I have deleted also whole recycle bin folder from desktop but issue still appers. Desktop in this configuration has it's own recycle bin - see
http://social.technet.microsoft.com/Forums/en-US/winserverGP/thread/9802ab25-7d10-4675-9bb3-affe261d743b - it is about My Documents Redirection, but it is the same for Desktop.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Is it necessary to redirect the Desktop to get this problem? Or is it sufficient to share just c:\Users\<username>\Desktop ?
Author of Total Commander
https://www.ghisler.com
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

Post by *dami »

It must be redirected and the share must be made available offline. I suspect redirected desktop in Windows has somehow different behavior when using offline synchronization then other shares.

I have tried some other file managers:

Free Commander - the same strange overwrite dialog when copying encrypted file to redirected desktop made available offline, just like in TC. When copying to other share, dialog asking whether to copy without encryption.

Altap Salamander and FAR do not allow to decrypt encrypted files on-the-fly and copy to share (access denied and similar errors).
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Does the Explorer copy method work in TC? Just select the files, press Ctrl+C, then Tab, Ctrl+V.
Author of Total Commander
https://www.ghisler.com
dami
Junior Member
Junior Member
Posts: 7
Joined: 2013-01-03, 14:21 UTC

Post by *dami »

The Explorer copy method in TC - the same overwrite dialog.

BUT - I have tried it once again with Windows Explorer (Ctrl+C, Ctrl+V in two separate Windows Explorer windows) and found out that copying this way does not do anything! It just looks like it is copying the file, but does not copy it. I did not notice it before - no overwrite dialog, no error, only the copied file will not appear in the destination folder. (And I haven't checked if it is really there. You know, I am more used to TC than Explorer environment :)

I am sorry to waste your time with an issue, that, as I now see, is some undocumented feature or behavior of Windows.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48079
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

It sounds more like a Windows bug - maybe someone who reads this and has connections to Microsoft could report it?
Author of Total Commander
https://www.ghisler.com
Post Reply