Why does the PROJECT_mcr folder, extracted from a CTF file compiled with MATLAB 7.5 (R2007b), keep growing when deployed for multiple users on a network folder?

11 views (last 30 days)
The folder grows to hundreds or thousands of files with names like .deploy_lock.0, .deploy_lock.1, etc.

Answers (1)

Sanchali Purandare
Sanchali Purandare on 16 Jan 2011
The mentioned CTF lock file is a protection mechanism to avoid file corruption when the files are accessed by multiple users. The file is usually created and deleted afterwards. This problem can be caused by the users having write permissions to the folder, but not delete permissions.
To work around this issue, either give the users or group the required delete permissions, or try the following workaround:
This lock is intended to prevent multiple processes from unpacking the application files from the CTF archive to the same directory at the same time. If this happens, the extracted application files are almost always corrupted. However, if the directory where the extracted application files reside is read-only from the perspective of the processes that use said files, there is no risk of file corruption.
To work around this issue set the environment variable ‘MCR_INHIBIT_CTF_LOCK’ equal to 1. On Windows systems you can follow the below steps:
1. In the Windows Control Panel, select System -> Advanced -> Environment Variables.
2. In the User variables for your user name tab, click New.
3. Enter the name MCR_INHIBIT_CTF_LOCK and set the value to 1.
4. Click OK to save your changes and close the Control Panel.
5. Log out from your Windows operating system, then log in.

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!