Welcome to
Help Desk

Product Updates
Training
Support
Ideas Contact Support

Automatic File Locking in the Egnyte Desktop App

When a user opens a file using the Egnyte Desktop App, the file is automatically locked in the cloud to prevent other users from overwriting changes. Other users who attempt to open or edit the file will receive a notification that the file is locked for editing most applications will still allow users to edit the file in read-only mode. This occurs regardless of whether the file is opened from the cloud, a Smart Cache device, or a copy of the file that has been synchronized for offline access.  

DA_windows_file_locking.png       DA_mac_file_locking.png

The file locking mechanism also reduces the chance of conflicts occurring. 

FAQ

I opened a file from one computer but I can still edit it from another computer where I'm logged in. How is that possible if the file is locked?

Every lock is tied to a specific user so it prevents other users from editing the file. If you log in using the same Egnyte account that holds the lock from a different computer, you can still edit the files. Other users will not be able to edit the file. 

How does the Desktop App determine when a file should be locked?

When a user opens a file with an application, the application opens a special handle on the file to let other applications know that it has the file open. We use this to determine when to lock the file. We only lock the file up to 5 seconds after the handle is opened and remains open to handle cases where applications frequently open and close files in short succession.

How does the Desktop App know how long files should remain locked?

A file will remain locked as long as the application which was used to open the file maintains an open handle on the file AND the user has an internet connection.

We achieve this by creating locks that last for 6 minutes in the cloud. In the 90 seconds before the lock is due to expire, we attempt to renew the lock for another 6 minutes. This process is repeated as long as the file is open by an application.

When is a file unlocked in the cloud?

Files are unlocked if any of the following occur:

  • The application closes the handle on the file to indicate it is no longer using the file.
  • If there is no connection to the cloud during the 90 second period when we attempt to renew the lock. This could be either due to the machine getting shut down, going into hibernation, or internet access being lost.

How does global file locking work with applications that used linked or cross-referenced files (e.g. Adobe InDesign or AutoCAD)?

In applications with linked files, users will typically open a master file that links to multiple files or assets. Linked files are usually loaded into memory and then immediately closed by the application but there are cases where such files are also held open as long as the master file is open. In most situations, the master file is locked since it is held open by the application and the linked assets are not locked so they can be opened and modified by other users. However, this behavior can vary based on the application being used.

Unsupported Applications and Files

The automatic locking mechanism is not supported for applications that do not maintain an exclusive lock on a file while it is open (for example, some applications close a file after its contents are loaded into memory). Though a user would see the file as open in such applications, the Desktop App would receive a notification from the system that the file was opened and subsequently closed, after which it would release any lock on the file. In such cases, Egnyte's conflict detection mechanism would still be able to detect conflicts between multiple users.

Below are examples of file types and applications for which the file locking mechanism will not take hold due to the behavior described above:

  • Adobe Illustrator (.ai)
  • Adobe Photoshop (.psd)
  • Text editing applications that load opened files into memory

 

Related Articles

Manual File Locking in Desktop App core

File Locking

Was this article helpful?
0 out of 4 found this helpful

For technical assistance, please contact us.