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


mbob

Recommended Posts

Since upgrading to v1.4.x (now using the latest v1.4.82) I have regularly the problem that I cannot save Office documents that are in a folder managed by BTSync.

 

If I exit BTSync and try to save the Office document again (Word or Excel) it works flawlessly.

 

So somehow it seems that BTSync is keeping a lock on the file/folder which prevents Office from saving the document.

Link to comment
Share on other sites

  • Replies 160
  • Created
  • Last Reply

Top Posters In This Topic

I encounter a very similar problem with Office (2010) and Sync 1.4.x also!

 

When saving a file to a folder that Sync is monitoring, maybe about 1 out of every 10 saves produces this:

 

Office_Sharing_Violation.png

 

I did identify this in the early "alpha" stages of 1.4 (and it's still present with the latest 1.4.83 build too), unfortunately though, I seemed to be the only one to encounter this, and the devs were unable to reproduce.

 

May I ask what version of Office you're using?

Link to comment
Share on other sites

I use Office 2013.

I also added ~*.tmp to the IgnoreList to exclude the temporary files of office from being synced.

 

I monitored the issue now with Microsofts Process Explorer (which can show, which process has handles to which files/folders).

 

And this just confirms, that it is BTSync somehow:

I open a file in Word, edit it, and try to safe, and get a permission error. At this time BTSync has a handle to the folder (but not to any file).

As soon as I close BTSync, saving works, and the handle (of course) is gone.

 

Anyway: it it very obvious that BTSync is preventing Office from saving the files, and this just happens since my upgrade to v1.4.x

Link to comment
Share on other sites

I tried one step further (using Microsofts Process Explorer):

 

  • BTSync running (sharing e.g. C:\Share)
  • open Word file C:\Share\test.docx
  • modifying Word file
  • saving => fails
  • Closing file/folder handle to C:\Share of BTSync using Process Explorer (requires admin privileges)
  • saving => works

 

So it is obviously a problem of how BTSync obtains the handle to the shared folder ...

Link to comment
Share on other sites

@mbob,

We've tried to reproduce it in our lab with no success. Is the reproduction stable in your case? Does it reproduce if you save the file in sub-folder of your synced folder or only to the top level?

 

Not 100% of the time but with certain files quite often, with others not at all (very strange therefore).

 

Although I made a new observation:

 

I'm using Office/Word 2013 64-bit. Usually files are saved as .docx, but these do not seem to make problems. I have problems with older .doc files (Word 97-2003).

So either when editing and old file, or when creating a new Word file and trying to save as Word 97-2003 document.

 

Hopefully this observation leads in the right direction ...

 

PS: by the way the file is/was in a sub-folder of the synced folder

Link to comment
Share on other sites

I have the logs ready to send.

 

My observation so far: the sharing violation seems to come from Winwords temporary file ~WRD0000.tmp, and this even although ~*.tmp is part of my IgnoreList.

 

By the way, it was harder to reproduce this with Process Monitor running, so it seems to be a timing problem, maybe there is a short time window where Winword does not hold a lock on the file, so that BTSync can get it, and then Winword is no longer able to complete the write process ...

Link to comment
Share on other sites

Thanks for the info!  I'll check the change-log before testing.  It would be great if you could squeeze it in because it's the type of bug that might put off new users who are not able/prepared to get on to the forum and discuss problems - rather they'll uninstall the software and revert to an inferior third-party-server-based product!

Link to comment
Share on other sites

By the way, the problem has been identified and fixed by a BTSync developer already ... should be in the next release probably.

Just wondering what was the current build on October 3? (I'm on 1.4.91 and want to know whether that is the aforementioned "next release" or whether said "next release" is yet to come).

The problems described here sound very similar to what I'm experiencing, but with some variations:

*Office 2010 on Windows 8.1 64bit. I was also running an older version of Sync on a couple of Windows 7 machines. I hadn't got around to updating on those machines yet, but have now done so. Problem is still there (in fact, I wonder whether I actually need to revert to the "old" version of Sync on all of my machines...?)

*Problem only seems to happen with Word

*.doc vs .docx makes no difference

*Happens every time I try to save. At first, I simply got "Word cannot complete the save due to a file permission error." But recently, Word has simply been opening the "Save as" dialog as though the file has never been saved. But if I try to just overwrite save, then I get the above error.

 

I'm hoping that these differences are just because I'm using an older version of Office than other users, and that the fix being developed will fix it for me too.

I also hope that said fix is still forthcoming, because if 1.4.91 contains it, then something still needs fixing.

Link to comment
Share on other sites

Just wondering what was the current build on October 3?

The latest desktop build as of October 3 was 1.4.83.

The latest desktop build as of today (October 10) is 1.4.91

 

(I'm on 1.4.91 and want to know whether that is the aforementioned "next release" or whether said "next release" is yet to come).

...

I also hope that said fix is still forthcoming, because if 1.4.91 contains it, then something still needs fixing.

I'm still awaiting for the official changelog from the devs, and this topic will then be updated accordingly.

Incidentally, the "aforementioned 'next release'" was a comment made by a user who speculated "should be in the next release probably". This wasn't an official guarantee that a fix would be present in time for 1.4.91 specifically.

 

However, on a side note, I can also confirm that I'm still seeing the behavior as outlined above with Office and 1.4.91

Link to comment
Share on other sites

I'm experiencing the same issue with saving my Arduino project files from the Arduino IDE 1.0.6. I'm running Sync 1.4.91beta on Win 7. My solution for now is to quit Sync while working and re-open it when I need to synchronize. Hope this gets resolved soon...

Link to comment
Share on other sites

Maybe I can add some more strange issue, that may be related to the same root cause.

 

I have an Excel File that is edited quite often. It happens now and then, that the file gets corrupted after editing/saving. The corrupted file then gets synced to the other nodes. Fortunately there is a copy of the last valid file in the Archive folder. But it also seems to be related to problems while saving ...

Link to comment
Share on other sites

@mbob

Looks like issue has the same root cause. Sync wants to open and sync Office temporary files while office does not like it. While you can't prevent Sync from opening the file (it happens before the ignore list is checked), please verify if "~*" filter is present in your .sync\IgnoreList. If you upgraded from 1.3 it might not be there, as it became default only in 1.4.

Link to comment
Share on other sites

I'm not sure if it also is related: as far as I remember, in ealier version there were a few seconds delay before file got synced to remote peers (e.g. 10 seconds).

 

So if the saving lasted less than 10 seconds, there was probably no problem before.

Now that syncing seems to start immediately, syncing and saving interfere with each other.

 

So may introduce just an option to set a delay ...

Link to comment
Share on other sites

How is this solved with other sync tools (Dropbox, owncloud, Seafile)? ... I never encountered similar problems with other tools.

 

While I understand that it is a logical challenge (I don't see a solution that would work in any situation), there must be some practical solution obviously. The delay is maybe one, but actually more or less a workaround than a solution.

 

Maybe delays dependent on file type? ;-))) a DelayedSyncList ... because it general it's good that syncing takes place as fast as possible.

Link to comment
Share on other sites

I can confirm this is happening on Ableton Live 8 on Windows 7 as well when saving to a folder which is synced. BTSync version 1.4.93 beta.

 

It seems the BTSync somehow locks the temporary file Live creates which causes Live to think the save process failed. Unfortunately I don't have logs at hand, but I was looking at Process Monitor and it showed access violation for Ableton Live regarding the temporary file it had just created.

 

Exiting BTSync solves the problem, but that's not a solution. Also solve by adding the temporary file to ignore file is not a solution in my books either.

 

Why would BTSync want to sync all the files created in a directory _immediately_? Why not wait few seconds (as it used to be)?

 

+1 for making this configurable.

 

Cheers,

Sampsa

Link to comment
Share on other sites

Excellent, another one of the issues I was going to report - I need to trawl the forum a bit more I think.

+1 - I have been having this same issue - with .83, .91 and .93  I thought it was an issue with a double synced folder as it seemed to be only the excel spreadsheets I am sharing with a customer in Spain using Synology (his choice)  but now it seems the culprit is BTSync!  I look forward to seeing the release notes show this one is fixed as I suspect it is also the root cause of files being overwritten by old files from the other peer.  Win7 machine running Office 365 (2013)  And it is not repeatable, it is random, but you found it anyway which is good!  

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.

Guest
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.