ERROR_ACCESS_DENIED: Access is denied. [CopyFileEx]

Get help for specific problems
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

Cannot copy file
"C:\Users\User\OneDrive - XYZ\abc\signed.pdf" to
""C:\Users\User\OneDrive - ABC\abc\signed.pdf"".

ERROR_ACCESS_DENIED: Access is denied. [CopyFileEx]

Copying files from a one drive desktop sync folder to another folder.
Checked all permissions etc, it was working fine for about 3 years and now suddenly it is giving this error, haven't changed anything anywhere. Same access same details same permissions. If i uninstall the one drive client and reinstall it it works fine for a couple of times and then again gives the same error for all files.

Has something to do with the One drive folder functionality. Anyone else had the same issue please help.
User avatar
Zenju
Site Admin
Posts: 5846
Joined: 9 Dec 2007

Post by Zenju

Where are the double double quotes coming from?
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

The double quotes are a typing error, please ignore it.

Cannot copy file
"C:\Users\User\OneDrive - XYZ\abc\signed.pdf" to
"C:\Users\User\OneDrive - ABC\abc\signed.pdf".

ERROR_ACCESS_DENIED: Access is denied. [CopyFileEx]
Gianni1962
Posts: 273
Joined: 13 Apr 2017

Post by Gianni1962

Are you sure that the OneDrive base folders are "OneDrive - XYZ" and "One Drive - ABC" ?
Two different OneDrive accounts?
xCSxXenon
Posts: 1066
Joined: 11 Jun 2019

Post by xCSxXenon

Probably syncing a business and personal account. Unlink the destination account and set it back up
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

Its the same One Drive Account ( Business ) Synching from one folder to another in the same one drive account. The one drive folder syncs to windows desktop local folder. The sync is setup from one local folder to another within this one drive sync folder (local) on windows. The same setup was working fine till last month. It has been working absolutely fine since last 1 year. This happens on a windows 10 machine. All of sudden this issue has come up. Same setup with same account and permission level ( and same folders synching) is installed on another machine running server 2016 and that works fine. Don't know what is wrong here. I have tried unlinking the destination and creating a new sync folder for one drive. The first iteration works fine. But if you run it again it just gives multiple errors. Please help
Gianni1962
Posts: 273
Joined: 13 Apr 2017

Post by Gianni1962

If the sync setup is from two folders in the same OneDrive account why the OneDrive folder names you have given are different?
A typo?

Give us the true error message, censoring with more care, and telling us clearly what you have censored.

The Windows username under which you are running the sync is the same who own the OneDrive folder?
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

Actual Error Message

Cannot copy file
"C:\Users\User\OneDrive - CRAE\TBR-CC\BB\2021\3. MARCH\RT\CW40.pdf" to
"C:\Users\User\OneDrive - CRAE\Main Data\BB\2021\3. MARCH\RT\CW40~3e6d.ffs_tmp".

ERROR_ACCESS_DENIED: Access is denied. [CopyFileEx]


The Windows Username is the same as who owns the OneDriver Folder. Only one user in the workstation.
Like i said before, the same setup was working for over a year and a half, stopped working all of a sudden. I am not sure if it was because of a windows update or something.
Gianni1962
Posts: 273
Joined: 13 Apr 2017

Post by Gianni1962

If you ignore this error does the sync go on and completes?

What antivirus is installed?
Windows Defender or something else?

Try a sync with the antivirus disabled.
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

If i ignore the error the sycn finishes with errors and no files are updated

I have Avast Free Antivirus. Have already tried disabling the antivirus, same error.
Windows Defender is Disabled

I have even reinstalled both filesync and onedrive clients, it syncs for the first time sucessfully. but when we do a second re-run, the error starts popping up. The Sync type is Update files in one folder, so it looks for changes in the source folder and updates the files in the destination folder.

Same setup for same configuration / account / onedrive profile / folders works fine on another machine which is running windows server 2016 when i tried.
cbuae
Posts: 6
Joined: 22 Feb 2021

Post by cbuae

If fact even if i am trying to sync files from the one drive location to an network location external. that is also not happening
Gianni1962
Posts: 273
Joined: 13 Apr 2017

Post by Gianni1962

Try this:
- unlink the OneDrive account
- delete completely or move elsewhere the "C:\Users\User\OneDrive" folder
- create "C:\Users\User\OneDrive" folder
- link the OneDrive account and be sure to connect to the "C:\Users\User\OneDrive" folder
- don't use the OneDrive option "Files On-Demand"
Save disk space with OneDrive Files On-Demand for Windows 10
- wait until OneDrive is synced

Retry the FFS sync.