check file permissions of source files if they won't sync

Get help for specific problems
Posts: 3
Joined: 18 May 2023

jimwspoon

I kept on getting ERROR_ACCESS_DENIED messages on certain files that wouldn't sync. I dug around for awhile and finally remembered that this had before. The problem was that I was logged in under a non-admin account that did not have permissions for those files. I could sync the files by running FFS as Admin, but then the problem might reoccur for those files if I didn't run as Admin. So I decided to change the ownership and permissions on those files. I ran FFS under the non-admin account, and again these files failed to sync. Use any method or tool you have to get to copy the pathnames of all those files. (I Ctrl+C copied them to an xplorer2 "scrap window", and then used Alt+C to copy the pathnames of all the problem files.) Then I followed the method here to change the ownership and permission of the files - https://answers.microsoft.com/en-us/windows/forum/all/how-to-change-permissions-for-multiple-files-at/be2d12bf-cb88-40c0-a6f2-5be43966e114 . After I did this, these files synced with no problems, even running FFS under a non-admin account.
Posts: 943
Joined: 8 May 2006

therube

(On my end, you cannot click the above link & have it actually load the expected page?
Maybe if you were "logged in" to MS or some such [crap]?
Copy & paste of the link does allow it to work.

https://login.microsoftonline.com/common/oauth2/v2.0/authorize?client_id=a81d90ac-aa75-4cf8-b14c-58bf348528fe&redirect_uri=http:...

What absolute nonsense MS is.)
Posts: 3
Joined: 18 May 2023

jimwspoon

Hi therube, not sure why that link didn't work, but the title of the thread at answers.microsoft.com is "How to change permissions for multiple files at once?" - maybe you can pull it up with a search. Anyway the procedure is pretty simple. The instructions were to run this command on every file to change ownership:
takeown /f "full path of file"
And to change permissions -
icacls "full path of file" /grant (USER NAME):F
I copied and pasted the whole list of paths that didn't sync in FFS into Excel. Then I used formulas to make the above command lines for each file, in a column. I pasted that column into a text editor and saved it as a batch file, then ran the batch. The ownership and permissions for each file was changed successfully. After that I ran the same sync in FFS as before, and now the files synced.
User avatar
Posts: 3600
Joined: 11 Jun 2019

xCSxXenon

So you changed permissions of files and posted that here why?
Posts: 3
Joined: 18 May 2023

jimwspoon

So I can get a start on catching up with your 2837 forum posts. You have my deepest admiration.