An HMI project backup on a CD-R reports access denied because files copied off finalized optical media carry the Windows Read-only attribute, and panel project software needs modifiable files just to open a project. Copy the whole project folder to the hard drive, clear Read-only on the copy, and open the project from there.
A panel project backed up to a CD-R refuses to open, and the PLC program backed up the same way opens fine. The disc is not damaged and the backup is not corrupt. Files copied off a finalized optical disc carry the Windows Read-only attribute, and panel project software needs to modify its project files from the moment it opens them, so it turns the disc copy away with an access-denied message. The fix costs one folder and one attribute: copy the whole project folder to the hard drive, clear Read-only on that copy, and open the project from the drive. This article gives the symptom check, the exact command, and the arithmetic that separates an attribute problem from a bad backup.
Why a CD-R copy reports access denied
A finalized CD-R is closed by the burner at the end of the write, and the disc never accepts changes afterwards. Windows reflects that state by setting the Read-only attribute on every file you copy off the disc. Your PLC project opened anyway because PLC software only needs to read a project file to open it; it meets the attribute when it saves. Panel project software never gets that far: it wants the project files modifiable from the first moment it opens them, so a Read-only copy fails at open with Access Denied, before you ever reach Save.
Nothing is wrong with the data. Only the attribute stands in the way, and a hard-drive copy puts it right.
Symptoms and what each one points to
- Access Denied on open, straight from the disc. The Read-only attribute on the copied files. This is the case this article fixes.
- The project opens but will not save. The same attribute, met at save time. Clear it on the hard-drive copy and save again.
- A missing-file, invalid-project or wrong-version message. The copy is incomplete, a file is damaged, or the software version does not match the project. Recopy the whole folder before anything else.
- The folder on the drive looks smaller or emptier than the disc. The copy stopped part way. Copy the folder again, then compare total size and file count between disc and drive.
- The project restores, then fails at the next reboot. A separate fault with its own checks; fixing an HMI project restore that fails after reboot covers that path.
Example: a 38 MB project off a 700 MB CD-R reports Access Denied
The inputs: one 80-minute CD-R of 700 MB capacity, the standard size for that disc type and the figure printed on its packaging; a project folder of 38 MB with its subfolders, read off the disc's properties in Explorer, a typical size for a small panel project; and the two documented behaviors, Windows setting Read-only on every file copied off finalized optical media, and the panel software refusing to open project files it cannot modify.
The rule, in words: two things can stop an open, capacity and access. Capacity fails only when the folder approaches the disc's limit. Access fails on every file, everywhere in the folder, because the attribute is set on each file Windows copies off the disc, and it has to come off each file and subfolder of the local copy.
The arithmetic: 700 MB minus 38 MB leaves 662 MB free, and 38 ÷ 700 = 0.054, so the folder fills 5.4 percent of the disc. Against that, one attribute sits on every copied file, and one command clears it in every subfolder at once: attrib -r *.* /s /d.
The result: capacity has 662 MB of headroom, so size cannot be the fault. The Read-only attribute on the copied files is.
The decision, with its threshold: any access-denied message on a copy straight off optical media means clear the attribute on a hard-drive copy first. A complete, writable local copy that still fails is what moves the suspicion to a damaged backup.
The fix: copy to the drive, clear the attribute, open locally
- Copy the entire project folder from the CD-R to a folder on the hard drive, whole, with every file and subfolder. Leave the disc untouched from here on, so the only backup survives every later step even if one goes wrong.
- In File Explorer, right-click the copied folder and choose Properties. On the General tab, clear the Read-only check box, and when Windows asks, apply the change to subfolders and files.
- For a deep folder tree, or when the checkbox leaves files behind, do it from the command line: open a Command Prompt, change into the copied folder, and run
attrib -r *.* /s /d. The attrib command's own help documents each switch:-rclears Read-only,/sreaches every subfolder under the current one,/dincludes the folders themselves. - Open the project in the panel software from the hard-drive folder, never from the disc.
- Save once to confirm the copy accepts writes, then carry on working on that copy.
How to check it worked
- The project opens from the drive folder with no access message.
- A save completes and the file's time stamp moves.
- Properties on two or three files inside subfolders shows Read-only cleared.
- The disc still shows Read-only on its own files, which is expected; that copy stays as the archive.
When clearing the attribute is not enough
- If a complete, writable local copy still reports a missing-file, format or version error, recopy the folder and compare total size and file count against the disc, then check that the software version matches the one that built the project. A disc that fails those comparisons is damaged; restore from another backup or rebuild the project.
- A panel that comes up without its project after a cold soak has a storage fault at the panel, not a file attribute; the article on an HMI panel losing its project after a cold soak walks that check first.
- The power-cycle variant of the same fault, where the project is gone after a normal shutdown and start, is covered in HMI panel loses its project after a power cycle.
Keep the disc as the archive, work on the drive
- Treat the CD-R as a dated snapshot: labelled with the date and the project version, read from, never edited.
- A CD-R accepts no changes after finalizing, so a new archive means a fresh disc burned from the saved working copy.
- Where the plant keeps automation projects under revision control, a second copy already lives outside any disc; controlling CODESYS project files in Vault without ENI shows one way to set that up.
Recommendation: Work every panel project from a hard-drive copy with Read-only cleared, and keep optical discs as dated snapshots only. When the software reports Access Denied on a disc copy, copy the whole folder to the drive, run attrib -r *.* /s /d inside the copy, and open the project locally; treat the backup as suspect only after a complete, writable local copy still fails.
Questions
Can I clear the Read-only attribute on the CD-R itself?
No. A burner finalizes a CD-R at the end of the write, and the disc takes no changes afterwards. Windows marks every file copied off that disc Read-only again, so each new hard-drive copy needs the attribute cleared once, on the copy. That is one checkbox or one command per copy; the disc itself cannot be cleared by any tool.
You cleared the Read-only box on the folder, but the software still reports Access Denied. What now?
The checkbox on the folder can leave files inside subfolders untouched. Open a Command Prompt in the copied folder and run attrib -r *.* /s /d, which clears the attribute on files in every subfolder and on the folders themselves. Then confirm the software is opening the project from the hard-drive folder, with no path pointing back at the disc.
How do I get the edited project back onto a disc afterwards?
Burn a fresh disc from the saved working copy and label it with the date and the project version; the original CD-R cannot take changes. Keep editing on the hard-drive copy. For a backup that survives independent of any disc, keep the project on a network drive or under revision control as well.
Planning information, not legal or engineering advice. Rules differ by place: check codes and permits with your local authority and your licensed trades.