none
*** Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) RRS feed

  • Question

  • Hello All,
       I have been running SyncToy for some time now and have had no issues until recently since I have upgraded to Windows 7.  I have an external USB drive that I sync my laptop to.  All my pair definations are configured as contribute.  In addition, on the external drive, I located all "synctoy_*.dat" files and removed them.  After deleting them, I configured SyncToy on the WIndows 7 machine.  When I attempt to run a Folder pair, I receive "*** Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ".  The user I log in as is an administrator, therfore, why can I not copy files from the laptop to the external drive?  As an additional test, I tried doing this manually.  It works manually, but I receive a dialog box stating "You'll need to provide administrator permission to copy to this folder."  I am then provide with continue, skip and cancel.  I press continue and all is well.  Is this maybe the issue why SyncToy is producing the Access denied?
       I have seen several response stating to create a shortcut to synctoy and cahning the "run as" to a user with administrator rights.  However, If the user I am loged in as already has administrator rights what is this going to buy.  Is there an actual fix?  Am I doing something incorrect?  angain, my pproblems only started since I just started using Windows 7.

    Thanks in advance for any and all replies

    LOG OUTPUT

    SYNC: 11/25/2010 20:13:44:551: SyncToy run of My Documents (c:\users\gary\documents\, E:\Laptop\C_Drive\Documents and Settings\Administrator\My Documents\) completed at 11/25/2010 8:13:44 PM.
    SyncToy action was 'Contribute'.
    SyncToy options were:
     Active for run all
     All files included
     No files excluded
     Do not check file contents
     Include read-only files
     Include hidden files
     Include system files
     Backup older files (send to Recycle Bin)
     All subfolders included
    SyncToy run took 00:00:00:421.
    Copied 171,412 bytes in 1 files in 00:00:00:421.
    Bytes per second 406,960.3, files per second 2.4.
    Avoided copying 9,913,248,305 bytes in 397 files that did not require action.
    Saved approximately 06:45:59:252 by not copying all files.
    Warning: 1 failures occured.
    You can retry by selecting "Run" again or select "Preview" to see
    the operations that remain to be performed.

    SYNC: 11/25/2010 20:13:44:551: *** Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) Copying c:\users\gary\documents\Visual Studio 2005\Settings\CurrentSettings.vssettings to E:\Laptop\C_Drive\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Settings\CurrentSettings.vssettings

     


    Thx, Gary
    Friday, November 26, 2010 1:35 AM

All replies

  • Hi Gary,

    Could you please check if admin approval mode is enabled, this mode is enabled to differentiate between standard user task and administrator task. You can also configure the application to run with elevated http://technet.microsoft.com/en-us/library/cc709691(WS.10).aspx#BKMK_S2.

     

    Thanks,
    Ramesh V

     

    Saturday, November 27, 2010 9:54 PM
  • When synctoy refuses to copy some of my VS files, I find that the file is either read only or is hidden. Clearing these attributes resolves the problem and synctoy then works. Right mouse click the offending file and select properties, then uncheck the boxes that say hidden and read only and select OK. Then re-run synctoy. Also check the read only and hidden attributes on the directory and clear them if set. Also check the destination to make sure that there is not a read only / hidden file in the way (delete or change its attributes).

    One other point: synctoy has an advanced feature that allows hidden files or read only files to be excluded. Check this by selecting the 'change options' for the directory pair that you want to sync. I suspect that this feature faulty because it implies that you can sync hidden / read only files. I have never been able to achieve this so I resort to clearing the attributes for this feature and it works fine after that.

    Monday, November 29, 2010 2:47 PM
  • Since this post, and a couple of hours of research, I found a articel on google that basically stated the following which resolved my issue

    1. Select the drive SyncToy is syncing to
    2. right click the drive and select properties
    3. Select the Security Tab
    4. Select Users
    5. Choose 'Edit'
    6. Select 'Full Control'
    7. Select 'Apply'
    8 Select 'OK'

    After the security setting were set, SyncToy begain to work


    Thx, Gary
    Monday, November 29, 2010 3:07 PM
  • I had the same error. And it had puzzled me  for a long time.

    Now I haved solved the problem by following the  above  procedures.

     

    Friday, February 18, 2011 2:24 PM
  • Hello All,
       I have been running SyncToy for some time now and have had no issues until recently since I have upgraded to Windows 7.  I have an external USB drive that I sync my laptop to.  All my pair definations are configured as contribute.  In addition, on the external drive, I located all "synctoy_*.dat" files and removed them.  After deleting them, I configured SyncToy on the WIndows 7 machine.  When I attempt to run a Folder pair, I receive "*** Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)) ".  The user I log in as is an administrator, therfore, why can I not copy files from the laptop to the external drive?  As an additional test, I tried doing this manually.  It works manually, but I receive a dialog box stating "You'll need to provide administrator permission to copy to this folder."  I am then provide with continue, skip and cancel.  I press continue and all is well.  Is this maybe the issue why SyncToy is producing the Access denied?
       I have seen several response stating to create a shortcut to synctoy and cahning the "run as" to a user with administrator rights.  However, If the user I am loged in as already has administrator rights what is this going to buy.  Is there an actual fix?  Am I doing something incorrect?  angain, my pproblems only started since I just started using Windows 7.

    Thanks in advance for any and all replies

    I have exactly the same problem as Gary. Upgraded to Windows 7, and what worked in the past now gives me Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    The problem is on those DOCX and XLSX files recently modified by Office 2010, as I observe. Setting Compatibility > Admin Privilege will remove the problem, but I want to find out why, especially it worked in the past.

    I did also try Gary's method of setting the "Everyone" permission of the destination folder to Full Control. It doesn't work and gives me the same error as aforementioned. Is Everyone and User different in this context? I thought Everyone is a super set comprising of  User?

    My question,

    Is this Windows 7 or Office 2010 problem? I upgraded to Windows 7 and Office 2010 simultaneously so I can't separate these two.

    How to solve the problem? Other than setting Admin Privilege or User Permission?

     

    Thank you very much!

     

    Wednesday, August 3, 2011 4:59 AM
  •  have exactly the same problem as Gary. Upgraded to Windows 7, and what worked in the past now gives me Error: Cannot write to the destination file. Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED)).

    The problem is on those DOCX and XLSX files recently modified by Office 2010, as I observe. Setting Compatibility > Admin Privilege will remove the problem, but I want to find out why, especially it worked in the past.

    I did also try Gary's method of setting the "Everyone" permission of the destination folder to Full Control. It doesn't work and gives me the same error as aforementioned. Is Everyone and User different in this context? I thought Everyone is a super set comprising of  User?

    My question,

    Is this Windows 7 or Office 2010 problem? I upgraded to Windows 7 and Office 2010 simultaneously so I can't separate these two.

    How to solve the problem? Other than setting Admin Privilege or User Permission?

     

    Thank you very much!

     

     

    I think I found the answer.

    From my observation, experiment and validation,

     

     Fact

    1.       No File Permission of Modify is the root cause.

    2.      NOT because of Windows 7 or Office 2010. The previous hypothesis of Office 2010 changes the file permission after saving/modification of the file is negative or groundless.

    3.       Permission is not part of the file content. Operating system maintains the permission in a separate entity.

    4.      SyncToy will not synchronize file permission to be the same for the same file at two different locations.

     

     Root Cause

    1.       SyncToy wanted to copy to the destination file and found that it has no file permission of modify. Therefore, it couldn’t modify the file for synchronization purpose.

    2.      Interestingly, it actually has the file permission of write. What is the difference between write and modify? I don’t know, but I think it should be subtle.

    3.       Windows 7 might have actually enforced the file permission more strictly and thus surfaced this problem. I don’t think the file permission has changed since long time ago. SyncToy doesn’t synchronize file permission between two storage locations; there is no file permission change opportunity.

     

    Solution

    1.       Granting file permission of modify will fix the problem immediately.

    2.      The permission granting needs to happen once. Office 2010 doesn’t change the permission. SyncToy doesn’t synchronize the permission. The solution will sustain.

    3.       This solution is better than setting administrator privilege to SyncToy, which will always invoke User Account Control (UAC) pop up every time it runs. Annoying.

     


    • Proposed as answer by Lawrence Teo Wednesday, August 3, 2011 4:16 PM
    • Edited by Lawrence Teo Wednesday, August 3, 2011 4:17 PM Formating Fix
    Wednesday, August 3, 2011 4:16 PM
  • Workt perfectly for me thanks 1 milj. times Gary  :-)

    Saturday, April 21, 2012 8:29 AM
  • With the later version of Windows (from Vista on), programs like SyncToy run with a more restricted user access control (UAC) in order to prevent malware taking control of your files. If a new drive is hooked up (via usb), the UAC values of the computer system are applied to it.  That means not being able to delete or overwrite files by default since the program runs at the lower user level access (security permission=user access, read only, but not write). 

    The solution is to right click the SyncToy startup icon and select run as administrator so that the program runs at a higher UAC level that permits deleting and overwriting files (security permission=read and write access).


    • Edited by packzap Monday, August 31, 2015 5:31 AM
    Monday, August 31, 2015 5:14 AM