Windows file permissions/ownership are preventing me syncing between computers

mike rodent

I have been using Google Backup and Sync for some time but I just decided it would be nice if I could use it for properly syncing so that data on all my Windows machines could essentially be the same, i.e. all use the same Gmail account Drive.

Everything has been working nicely. But today I tackled the files used by MySQL (in fact MariaDB MySQL fork).

If I modify some data on one machine (machine "A"), several files get changed: ibdata1, ib_logfile0 and ib_logfile1. These then get mirrored to the Cloud location (i.e. GDrive remote site). Unfortunately, these 3 files (and a couple of other MySQL files) don't then replace the existing files on machine B.

When I look at the reason why GB&S is saying "can't sync" for these files on machine B it says "You don't have permission to sync these files".

I take this to mean because the MySQL service is being run by the owner SYSTEM.

I've tried a couple of times to understand how Windows file ownership and permissions work in reality (it seems to be different to some of the explanations out there). But is there a quick or not-so-quick fix for this problem?

A few more details

Looking at the existing ibdata1 file on machine B (where the incoming replacement of this file is not being allowed to replace it), I find that in fact the owner is said to me "M17A/Mike", where M17A is the name of the computer.

Under the "Security" tab for the file, there are four entries under "Group or user names": Authenticated Users, SYSTEM, Administrators (M17A\Administrators) and Users (M17A\Users). All 4 of these have "Full control" ticked (I set this myself earlier today trying to solve this problem).

Rather than ownership/control, could it be something to do with the fact that the MySQL service has these files under its control as long as it is operating? Again is there any solution to this?


PS there's another problem with this, which is the size of these MySQL files: a tiny modification to one record in one dbase triggers the uploading of over 100 MB of files (the 3 main files mentioned above) by GB&S, followed by the downloading of them to sync the other computers attached to the same account. But this is a separate and less urgent problem.

Appleoddity

The googledrivesync.exe executable runs as the user who starts the application. This would typically be the user currently signed in to the computer. This means your user accounts needs to have full control permissions on any files / folders you want Google Backup and Sync to access. Best practice would be to make sure that full control permissions are granted to your user account on the google drive folder and those permissions are propagated to all subfolders and files.

Rather than ownership/control, could it be something to do with the fact that the MySQL service has these files under its control as long as it is operating? Again is there any solution to this?

Yes. This is why Google Backup and Sync cannot modify the file. This is not a Google Backup and Sync limitation. This is a limitation (or rather a protection) in the operating system that prevents one process from modifying a file that is open in another process.

There is not a solution for that.

Unfortunately, you're running in to problems with all cloud sync tools and to a greater extent the problem of file sharing in general. You're trying to use it to sync an in-use database file. Even if the application that is accessing the file is designed in such a way that multiple processes can share the file, it still wouldn't work well with a cloud sync tool. You are not working with live data on cloud synced folders. Instead, one machine modifies the file and the changes are uploaded to the cloud, then the second machine recognizes the changes and downloads the file. There is lag, and no guarantee that both machines will always have a reliable internet connection. There is no mechanism to insuring the integrity between these file level changes. The two machines are never accessing the "same" file as is the case with an application that may be designed to work together with multiple users on the same local network.

For that reason, use Google Backup and Sync to sync files that a have a low likelihood of being used by multiple machines at the same time.

A work around in your situation would be to setup a manual process where Machine A backs up the MySQL database to a file and then allow that file to sync to Machine B. Then, Machine B restores that backup file to the MySQL database on Machine B. Perform this process when you want to "refresh" the data on Machine B.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Syncing Windows registry between several computers

From Dev

Syncing Large Amounts of Files Between 2 Windows Computers

From Dev

Does syncing the .git repo between computers cause an issue?

From Dev

Syncing apt-get installations between multiple computers

From Dev

Syncing git repositories across computers

From Dev

Share windows user account between computers

From Dev

Shared folder "Access is Denied" between Windows computers

From Dev

Direct transfer of a file between two computers on the Internet

From Dev

File transmission between two computers via ssh

From Dev

Connect linux and windows computers for file transfer

From Dev

windows 10 not showing computers in network in file browser

From Dev

Mapping drive through ssh tunnel between Windows computers?

From Dev

How can I create a remote connection between Mac & Windows computers?

From Dev

Preventing Windows program from interpreting ^Z as end of file

From Dev

Preventing Windows program from interpreting ^Z as end of file

From Dev

Does computers on same LAN share their hosts file between each others?

From Dev

Does file user ownership change when transferring files between computers?

From Dev

What are the exact steps for setting up file sharing between ubuntu computers?

From Dev

Cortana stopped syncing text messages (sms) between Windows and my Android phones

From Dev

Data not syncing between CouchDB and PouchDB

From Dev

Syncing Windows Phone 7 and Computer

From Dev

Syncing Google Accounts with Windows 10

From Dev

What is the error in my syntax preventing me from loading my data file into mysql

From Dev

bash file in mac not functioning properly. How to restart or remove it? It is preventing me from doing anything meaningful in Terminal

From Dev

Preventing multiple appends to a file

From Dev

Background Tasks for regular file syncing

From Dev

windows not allowing me to replace file

From Dev

how to connect two Windows computers by USB for communication between their virtual serial ports?

From Dev

Regularly moving NTFS drive between Windows 10 computers causes data corruption

Related Related

  1. 1

    Syncing Windows registry between several computers

  2. 2

    Syncing Large Amounts of Files Between 2 Windows Computers

  3. 3

    Does syncing the .git repo between computers cause an issue?

  4. 4

    Syncing apt-get installations between multiple computers

  5. 5

    Syncing git repositories across computers

  6. 6

    Share windows user account between computers

  7. 7

    Shared folder "Access is Denied" between Windows computers

  8. 8

    Direct transfer of a file between two computers on the Internet

  9. 9

    File transmission between two computers via ssh

  10. 10

    Connect linux and windows computers for file transfer

  11. 11

    windows 10 not showing computers in network in file browser

  12. 12

    Mapping drive through ssh tunnel between Windows computers?

  13. 13

    How can I create a remote connection between Mac & Windows computers?

  14. 14

    Preventing Windows program from interpreting ^Z as end of file

  15. 15

    Preventing Windows program from interpreting ^Z as end of file

  16. 16

    Does computers on same LAN share their hosts file between each others?

  17. 17

    Does file user ownership change when transferring files between computers?

  18. 18

    What are the exact steps for setting up file sharing between ubuntu computers?

  19. 19

    Cortana stopped syncing text messages (sms) between Windows and my Android phones

  20. 20

    Data not syncing between CouchDB and PouchDB

  21. 21

    Syncing Windows Phone 7 and Computer

  22. 22

    Syncing Google Accounts with Windows 10

  23. 23

    What is the error in my syntax preventing me from loading my data file into mysql

  24. 24

    bash file in mac not functioning properly. How to restart or remove it? It is preventing me from doing anything meaningful in Terminal

  25. 25

    Preventing multiple appends to a file

  26. 26

    Background Tasks for regular file syncing

  27. 27

    windows not allowing me to replace file

  28. 28

    how to connect two Windows computers by USB for communication between their virtual serial ports?

  29. 29

    Regularly moving NTFS drive between Windows 10 computers causes data corruption

HotTag

Archive