When a user opens a file using the Egnyte Connect 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 and can still view the file in read-only mode. The file locking mechanism also reduces the chance of conflicts occurring.
An example of the file locking mechanism is shown below:
1. When a user, Jason Smith, opens a file from the Desktop App, it is locked in the cloud
2. Whenever another user attempts to open the same file from the Desktop App, they are notified that the file is locked for editing by Jason Smith. They can still open the file to view its contents but will not be able to edit the file.
Unsupported Applications and Files
The automatic locking mechanism is not supported for applications which immediately 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 immediately closed. In such cases, Egnyte's conflict detection mechanism would still be able to detect conflicts between multiple users.
The following file types and applications cannot be supported with the file locking mechanism due to the behavior described above:
- Adobe Illustrator (.ai)
- Adobe Photoshop (.psd)
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 account that holds the lock from a different computer, you can still edit the files, but other users will only be able to read contents of 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 to 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. We repeat this process 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, or
- 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.