Problem
How to troubleshoot the system error “A file appears to be locked”?
Solution
This issue usually occurs when the input or temporary files are being restricted by Windows, antivirus software, or network permissions. As a result, SACS cannot access or overwrite files required for the analysis.
The error is typically due to one of the following:
- The working directory or files are marked as Read-only
- A background process (e.g., PostVue database, unfinished run, or Windows cache) is holding the files
- The analysis is being executed from a network drive or shared location with restricted permissions
- An antivirus or endpoint protection tool is temporarily locking SACS files during execution
Please try the following steps:
1. Check and remove Read-Only Attribute - This ensures SACS can freely read and write to the necessary files during the run.
- Right-click on your working folder and files used for the analysis.
- Go to Properties --> ensure that Read-only is unchecked.
- Apply changes to all files and subfolders.
2. Restart to Release File Locks - Sometimes a background process (PostVue or an incomplete analysis) may continue to hold the files.
- Restart your computer to clear any locked handles, then rerun the analysis.
3. Use a Local Working Directory - Running models from network or shared drives can cause file access conflicts.
- Copy your model folder to a local path (C:\SACS\Models\PSI_Test) instead of a network or shared drive.
- Keep the folder path short and avoid special characters or long directory names.
4. Temporarily Disable Antivirus Scan, as some antivirus or endpoint security tools can lock temporary SACS files (.tmp) during the run.
- Temporarily disable antivirus scanning for your working folder.
- Alternatively, add an exception for the SACS working directory in your antivirus settings.
After performing the above checks, rerun the analysis. If the run completes successfully without the “file locked” message, the issue has been resolved.
If the issue persists:
- Ensure you have write permissions to the working directory.
- Check that the model files are not open in PostVue or any editor.
- For multi-user environments, confirm no other user or process is accessing the same model files.