Ms Office: Don't Have Permission To Write To The Selected Folder


Recommended Posts

  • Replies 160
  • Created
  • Last Reply

Top Posters In This Topic

@Hopkins: I assume the main difference is/was, that in the 1.3 version there was a (10s) delay between file change and syncing. But as RomanZ already stated, this delay caused other issues.


In theory I think it is correct to work without delay. Of course the goal should be to get files synced to other peers as fast as possible.


I'm also not sure in what way Office (or other applications) is responsible for the problem. With Office for example I have this problem only when writing the old .DOC format, but not when using the newer .DOCX format.


My theory is:

  • BTSync needs to exclusively lock the file in order to guarantee that no one can change the files during the sync process, so that the other peers get a consistent state of the file.
  • This lock seems to prevent applications from saving the file.
  • Now: the question is, if BTSync can get a lock, this means the other application has no lock on the file - so why does Office not have any lock on the file while saving?

Another idea: what about the use of Volume Shadow Copies (in Windows at least)? This should grant BTSync access to(a copy) of the file without interfering with other applications ...?

Link to comment
Share on other sites

@mbob, the issue is more to do with the way that Office saves files - it doesn't seem to save changes directly back to the file you're working on, instead, when you save, Office (Excel, Word, etc) appears to do the following "behind the scenes":

  1. Creates a temporary file in the same folder
  2. Writes the document you're working on to the temporary file it's just created
  3. Deletes the original file
  4. Renames the temporary file to have the same name as the original
  5. Opens this new file in place of the original you were working on


It's this creation/deletion/renaming/opening process that appears to be causing the problem, and causing the problem for Office, rather than Sync - as Office seems to then have trouble re-opening the file created in Step 4 above if Sync happens to be accessing/indexing it at the same time.


This is likely why the issue wasn't present in 1.3, as the "10 second delay" that Sync had allowed all 5 steps above to complete before Sync took any action. Now, Sync starts doing its stuff as soon as Step 1 completes!

Link to comment
Share on other sites



I am syncing files between my computer at work and my private computers using BTSync. Since I've updated my computer at work (Windows 7) to BTSync 1.4.93, I am having trouble to edit Word files inside synced folders. I can create new files and initially save them (Using "Save as..."), but when I change something in the file and use "Save" to save the changes, I get an error telling me about wrong file permissions (Error Code 200635).


What I have tested:


- This happens exclusively only with Word files. Excel is ok, other programms such as Notepad++ are fine.

- Switching off BTSync or disconnecting the folder (removing it from sync) solves the problem. Then I am able to save changes as one would expect.

- Moving the file to another folder (even one that has another key for syncing) does not solve the problem

- The problem is independend from the file name


Do you have any suggestion on what is going on here?




Link to comment
Share on other sites

Hello again!


Well, apparently my post was moved to this thread. So I guess I found a solution to my problem: It is not an exclusive problem with BTSync - it is a interference from BTSync and our virus protection (Symantec Endpoint Protection). When I switch the virus scanner off or deselect "All file types" in the auto-protection settings, everything is back to normal.


Hope that helps a little in finding the cause of the problem(s).




Link to comment
Share on other sites

I have no Antivirus installed (except MS default Security Essentials / Defender on Win 8), and I have this problem, so it is obviously not related to Symantec or Kaspersky.


However, virus protection may slow down everything, and thus makes it more likely to get into timing problems.


But then again: why does normal virus protection software not interfere with Office? Isn't there the same problem that virus protection needs to open the files after they have been written?


Why can BTSync not use a delay? This would prevent the application from syncing temporay files also (which I often see in BTSync's history).


Which issue has been causes by the delay? Actually BTSync must be able to initiate the sync process at anytime anyway (after system startup, every 10 minutes per default, etc.) - so what difference does it make to run it <n> seconds after a file has been modified?

Link to comment
Share on other sites


- BTSync needs to exclusively lock the file in order to guarantee that no one can change the files during the sync process, so that the other peers get a consistent state of the file.

Vice versa. Sync opens the file for a moment to check if someone opened it for writing, and Office attempts to open the file for exclusive use at this moment - and gets a violation.


why does normal virus protection software not interfere with Office?

Anti-malwares work with files completely differently. Anti-malware brings a filter driver, which subscribes to filesystem events and gets a chance to get a file read / file write event just a moment before it is opened by a requester (and block file operation until it completes whatever it wants - scanning, hashing, etc.).

Sync is pure user-space application and does not bring any drivers with it. So it is pretty limited in tools it can utilize to monitor file changes and actual status.


As I mentioned, our devs are working on solution to both minimize sync delay and make it tolerant to such interoperability issues.

Link to comment
Share on other sites

I have a problem with Sync and Access 2010. If Sync is running i often cant backup my access-database with the access-feature. Often an error-message appears like this: "cant create a backup, the file is still in use or locked". The same when i try to comprimize or repair a database with the access-feature.

When i shutdown Sync the error-messages do not appear...

Link to comment
Share on other sites

I don't think it's you, I couldn't find a way to send a PM either. The only thing that comes close is the Profile Feed tab after you click on the avatar, but that seems more like a facebook style wall post or something.



*Edit: Alright, it seems *after* you make a post, and then visit the users profile, you see the SEND MESSAGE button. There you go.

Link to comment
Share on other sites

@all, if you're unable to PM RomanZ, just express your interest in this thread instead and I'll ensure RomanZ sees it.


...and just to give you an update, it looks like the team have now been able to address this issue! The fix itself hasn't been included in today's public 1.4.99 build however, as it needs further testing to ensure there are no knock-on issues as a result of the fix.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.