Some programs have a built-in File Locking mechanism in order to prevent data loss when multiple users try to access the same file from a network share. Data loss can occur because only the changes from the last person who triggered a save would be written to the file.
With the Desktop Client use case, standard locking mechanisms will fail because each user will have his/her own copy of the cloud file in their cache. Desktop Client refers to the Windows Client or Mac Client.
In the standard same-file use case, this is usually achieved with the automatic creation of hidden/temporary files. With the Desktop Client own-copy scenario, the file locks are stored in the database (on the cloud) and are event-driven, so a local service needs to monitor the editing applications in order to create and release locks in real-time.
How to Set Up the Triofox Distributed File Locking Mechanism
The first step is to filter out the temporary file locking files from syncing, so they don't end up on the cloud by mistake. The second step is to make sure that the correct application packages are being monitored.
Please note that some applications, such as Microsoft Access are extremely corruption and crash prone if the file locking files are synced. In fact, Microsoft Access has massive problems with almost all cloud drives, including Dropbox, Google Drive, OneDrive, and even SharePoint. Microsoft doesn't even recommend that you use Access with their own cloud products. See the following articles for more information:
Other programs such as AutoCAD can cause file corruption if the file lock files are uploaded to the cloud. Please read this article for specific AutoCAD settings that help with this problem:
Having said that, if you do choose to save such files in Triofox, please make sure you have versioning enabled. Also, consider making backups of your backend storage, or sign up for Triofox's hosted backup services.
Visit the Group Policy->Folder & Storage->Filters page and add the extensions of files that are used for locking and that you do not want to be synced to the cloud. Enter only the files that are likely to be used by your users. Enter square brackets to follow the format requirements. Example:
Note: Microsoft Office creates temporary files that follow a pattern of ~$FILENAME, where FILENAME is the actual name of the file. You DO NOT need to worry about this pattern, because Triofox is already optimized to handle this!
Some popular file lock extensions that you may want to consider:
- .dwl and .dwl2 - AutoCAD Drawing Lock File
- .ldb - Microsoft Access database lock
- .lck - Used by various applications and operating systems
- .lock - Used by various applications and operating systems
- .laccdb - Microsoft Access database lock
- .lrd - Microsoft Money lock data
- .idlk - Adobe InDesign lock file
- .filetablelock - Eclipse lock data
Set up the Group Policy->File Locking settings page
The setting "Unlock file after it is uploaded" can be useful for helping the file locking mechanism when the application itself does not issue native handles on the files. I would recommend that you check this setting to be on the safer side, unless your users only use well-supported applications, such as Microsoft Office.
"Lock File Natively on Network Shares" creates a Windows handle on the file server's attached folder. This is useful if your users attach network folders to the cloud with their Windows Clients, and other users access the same files directly on the network folders without a Desktop Client.
"Lock Files Natively for Files Inside an Attached Folder from Server Agent" applies only if you have a file server with the Server Agent software installed. In addition, you have attached folders and users access the files from either Desktop Clients or directly on the file servers/network folders.
The Desktop Clients do not simply monitor every possible program on a user's machine. Doing so would not be desirable from a performance standpoint, therefore you should monitor only the processes that your users are likely to have. winword.exe, excel.exe, powerpnt.exe are already filled in due to their extreme popularity. Please note that the Mac processes do not have .exe.
Some processes from popular applications are:
- acad.exe - AutoCAD
- illustrator.exe - Adobe Illustrator
- photoshop.exe - Adobe Photoshop
- indesign.exe - Adobe Indesign
- devenv.exe - Microsoft Visual Studio
- mspub.exe - Microsoft Publisher
- winproj.exe - Microsoft Project
Since this list could be infinitely large, you can simply find out what the executable name for your application is by right-clicking on its windows shortcut (from the Start Menu or quick-access bar)
On Macs, you could press Command-Option-Esc to access the processes menu. The names of the currently running processes will be displayed.
Important: Please restart your Desktop Clients whenever you make Global changes such as the ones above.
How to Test the File Locking Mechanism
Open a file on the windows client. For my example, I opened a .dwg file using AutoCAD. Under my File Locking settings described above, I added acad.exe to the list of processes, and filtered out .dwl and .dwl2 files.
Leave AutoCAD open and then open the Windows Client web management console from either the task tray menu or the Start Menu's shortcut. A lock entry will be visible.
You can also verify that the file is locked from the File Browser. To do so, open the Web Portal.
Navigate to the folder where the dwg file resides and select it. Then, open the right-side information panel and verify that a lock is present.
Now close the AutoCAD application and revisit the management console or File Browser. The lock should be gone... No other user on the cloud will be able to edit the same file while a lock is in place on the cloud.
Optional. If you'd like to test the native handles on attached folders, you can use a freeware from Microsoft called "Handle." Simply download the portable app and execute it via a command prompt window: https://docs.microsoft.com/en-us/sysinternals/downloads/handle
You can open a file using a Desktop Client, and execute the "handle.exe [\\ATTACHED FOLDER HERE\FILENAME HERE]" from a command prompt. Replace the arguments inside the brackets with your own information.
If you have any issues with the file locking mechanism, please open a support ticket by sending an email to email@example.com