Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
The “Cannot create file xampp-control.ini — Access is denied” message usually means the XAMPP Control Panel cannot write its own settings file when it is closing. It is normally a Windows file-permission or User Account Control (UAC) problem, especially when XAMPP is installed under C:Program Files. Stop the XAMPP services, close the panel, then start xampp-control.exe with Run as administrator. If the error returns, grant your Windows account Write or Modify permission on xampp-control.ini. Recreating the file is a later fallback, because it can reset saved panel preferences.
What does “Cannot create file xampp-control.ini” mean?
xampp-control.ini is the XAMPP Control Panel’s settings file. The panel updates it when you change options and commonly when you exit. The error means the Windows account running xampp-control.exe cannot create or modify that file at the moment XAMPP tries to save it.
As an Amazon Associate I earn from qualifying purchases.
This is generally a Control Panel shutdown problem, not an Apache web-server failure. GIGAS JAPAN documents the message appearing while the Windows panel is closing; a follow-up dialog can make the panel look frozen even though Apache or MariaDB was already stopped. The exact wording may vary by XAMPP release, but the underlying issue is still a denied write operation.
Why does XAMPP show the error when I quit?
Windows protects files in certain folders and applies access-control lists (ACLs) to individual files. If the panel was installed in a protected location, or if the INI file inherited restrictive permissions, XAMPP may be able to start services yet fail when it saves its settings on exit.
Popular on Amazon
- Spacious Design: Measuring 21.1" wide and 14.1" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy ergonomic support with the integrated cushioned wrist rest.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a sleek black carbon color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.8 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
- Protected installation folder: Apache Friends notes that
C:Program Filesdoes not automatically give an administrator full write privileges. - UAC restrictions: being a member of the Administrators group does not mean every application runs with an elevated token.
- File-specific ACL:
xampp-control.inimay allow reading but not writing for your account. - Stale or damaged file state: an old or malformed INI can retain permissions that no longer match the account using XAMPP.
- Panel still running during a change: editing or deleting the file while the panel is open can leave the operation incomplete.
Disabling UAC is sometimes listed as an old workaround, but it lowers Windows protection and is unnecessary when elevation or a narrow permission change solves the problem.
What should I do first?
Use this order: stop every XAMPP service, close the panel, launch it elevated, and test a clean exit. Only change file permissions or recreate the INI if the elevated launch does not solve the error.
- In the XAMPP Control Panel, click Stop for Apache, MySQL or MariaDB, and any other running module. Wait until each status changes to stopped.
- Close the Control Panel completely. If a confirmation or error dialog is open, dismiss it; check Task Manager for
xampp-control.exeand end that process only if it remains after the window closes. - Open the folder where XAMPP is installed. Typical locations include
C:xamppor a custom folder you selected during installation. - Right-click
xampp-control.exeand select Run as administrator. Approve the UAC prompt. - Close the panel again without starting services. If the dialog no longer appears, the problem was insufficient elevation.
This elevated launch also matters when you install or remove Apache, MySQL/MariaDB, or other components as Windows services. Apache Friends specifically says the Control Panel and related scripts need administrator privileges for those service operations.
How do I make the administrator launch permanent?
If starting the executable as administrator fixes the exit error, set the compatibility option so you do not have to remember the right-click command.
Also popular on Amazon
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
- Close the XAMPP Control Panel and stop all modules.
- In the XAMPP folder, right-click
xampp-control.exeand choose Properties. - Open the Compatibility tab.
- Under Settings, select Run this program as an administrator.
- Click Apply, then OK.
- Open the panel from that executable or its shortcut, approve UAC, and quit once to confirm that the INI saves normally.
Apply the setting to the actual executable, not merely to a shortcut. If you move the XAMPP folder later, check the setting again because Windows treats the relocated file as a different executable.
How do I grant write permission to xampp-control.ini?
When elevation is inconvenient or does not persist, grant your own Windows account the minimum permission needed on the INI file. Write or Modify is normally sufficient; giving Everyone Full control is broader than necessary.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →- Stop all XAMPP modules and close the Control Panel.
- Open the XAMPP installation folder and locate
xampp-control.ini. If you cannot see file extensions, enable View > Show > File name extensions in File Explorer so you do not edit a similarly named file. - Right-click the file and choose Properties.
- Open the Security tab and click Edit. Approve the administrator prompt if Windows asks.
- Select the Windows account that normally launches XAMPP. If it is not listed, click Add, enter the account name, choose Check Names, and confirm.
- In the permissions pane, allow Write. If the interface presents grouped permissions, allow Modify instead. Do not select Full control unless you have a specific administrative reason.
- Click Apply and OK on each dialog.
- Start
xampp-control.exenormally, make no service changes, and close it. The shutdown dialog should be gone.
Keep the change limited to this file and the account that needs it. A broad permission grant can expose the panel’s settings to other local accounts and makes future troubleshooting harder. If the Security controls are unavailable, you may need an administrator account to take ownership or change the ACL; do not alter ownership of the entire XAMPP directory merely to fix one INI file.
Should I delete and recreate the INI file?
Recreating xampp-control.ini is a fallback when its ACL is confused, the file is stale, or the targeted permission change has no effect. Community reports, including a Stack Overflow answer, say that deleting the file and starting the executable can cause XAMPP to create a replacement with usable permissions. This is not an Apache Friends guarantee, so preserve your settings first.
Also popular on Amazon
- Note: Not suitable for MacBooks released after 2023 or devices with a protruding front camera; Not applicable to full-screen or notch-style tempered glass screen protectors; Do not use on the rear camera of the phone.
- 💻 Why Do You Need a Webcam Cover Slide? — Safeguard your privacy by covering your webcam with our reliable webcam cover when not in use. Don't let anyone secretly watch you. Stay protected!
- ✅ Thin & Stylish — Enhance your laptop's functionality and aesthetics with our 0.027" ultra-thin webcam covers. Seamlessly close your laptop while adding a touch of sophistication.
- ✅ Fits Most Devices — Compatible with laptops, phones, tablets, desktops! Keep your privacy intact on Ap/ple, Mac/Book, iPh/one, iP/ad, H/P, L/novo, De/ll, Ac/er, As/us, Sa/msung devices.
- ✅ 365 Days Protection — Our upgraded 3.0 adhesive ensures a strong hold that won't damage your equipment. Experience reliable, long-term privacy protection day in and day out.
- Stop Apache, MySQL/MariaDB, and every other XAMPP module.
- Close the Control Panel and confirm that
xampp-control.exeis no longer running. - Copy
xampp-control.inito a safe backup location, such as your Documents folder. This preserves a way to recover custom panel settings. - In the XAMPP folder, right-click the original INI and choose Delete. If Windows refuses, use an elevated File Explorer window or first correct the file’s Security permissions.
- Launch
xampp-control.exe. If necessary, use Run as administrator for this first launch. - Close and reopen the panel. Check whether a new
xampp-control.iniexists and whether the shutdown error has disappeared. - Reapply any panel preferences that were reset. Keep the backup until you have confirmed that the replacement works.
Do not delete Apache, MariaDB, PHP, or application files as part of this procedure. The fallback concerns only the Control Panel’s INI file.
Which fix should I try?
The least invasive option is to elevate the panel. Use a file-level permission change when you need normal launches without elevating the whole session, and reserve recreation for a stale or damaged INI.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
| Fix | Best use | Trade-off |
|---|---|---|
Run xampp-control.exe as administrator |
Fastest first attempt; also required for some Windows service operations | Elevates the entire Control Panel session and triggers UAC |
Allow Write or Modify on xampp-control.ini |
Persistent, narrow repair when the file ACL is the cause | Requires editing Windows Security permissions |
| Delete and recreate the INI | Stale, malformed, or confused file-permission state | May reset saved panel preferences; supported by community reports rather than an official guarantee |
| Disable UAC | Legacy workaround mentioned by an older FAQ | Weakens Windows protection; avoid when a narrower fix works |
How can I verify that the repair worked?
Test the file-writing problem separately from the web-server problem. A successful repair means the panel can close without the “Cannot create file” dialog; it does not by itself prove that Apache or PHP is configured correctly.
- Open the panel using the launch method you intend to keep.
- Start Apache and MySQL/MariaDB only if you need them, then stop each service cleanly.
- Close the Control Panel and confirm that no INI error or follow-up dialog appears.
- Reopen the panel and check that your expected settings remain.
- For XAMPP’s basic web-server check, open
http://localhost/orhttp://127.0.0.1/in a browser and look for the XAMPP start page.
If the start page loads but the shutdown error returns, the web stack is functioning and the remaining issue is still the Control Panel’s write access. If the error is gone but the start page does not load, troubleshoot Apache ports, service state, or firewall rules separately rather than changing the INI again.
Also popular on Amazon
- Anti-Slip Surface - Transform your laptop into a mobile workstation with the AboveTEK portable laptop lap desk. The anti-slip surface provides a strong grip for laptops up to 15.6 inches(Diagonal), while the double rubber strip on the bottom ensures a stable display or typing experience on your lap, couch, or bed.
- Retractable Mouse Pad - Retractable laptop mouse pad extends on both directions for the left/right handed with elevation along the edges for stopping mouse from falling off. The size of laptop tray is 14" X 9.7" and the size of mouse pad is 7.4" X 6.1".
- Effective Heat Shield - The effective heat shield made of sturdy and thick material protects your laptop from overheating. Prioritizes your comfort and safety, an ideal lap pad or board for working anywhere.
- EASY to Carry and Store - With an ergonomic and simplistic design, the lap desk is portable to store in a backpack. Only 15" in size, 2.2 lb of weight and with slim 0.6 inch thickness, it is ready to be easily carried around.
- Widely Applicable - The smooth platform accommodates laptops and tablets up to 15.6 inches(Diagonal), making it a versatile accessory and one of the best gifts for mom, dad, students and professionals. Perfect for use as a laptop bed tray or tablet holder anywhere at home, library, or park.
What if the error remains after these steps?
Work through the following checks before making broader system changes.
Confirm you edited the active XAMPP installation
Multiple XAMPP copies can exist. Use the shortcut that you actually launch, choose Open file location, and verify that the adjacent xampp-control.ini belongs to that installation. Editing an unused copy will not affect the panel showing the error.
Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallCheck that the file is not read-only
Right-click the INI, open Properties, and clear Read-only if it is selected. A read-only attribute is separate from the Security-tab ACL, so clearing one does not automatically change the other.
Look for security software or a controlled-folder rule
Some Windows security configurations can block an application from changing files even when ordinary permissions look correct. Review the relevant Windows Security protection history and allow the specific XAMPP executable only if you trust the installation. Do not turn off protection globally as a diagnostic shortcut.
Also popular on Amazon
- Spacious Design: Measuring 21.1" wide and 12" deep, our lap desk comfortably fits most laptops up to 15.6". Extra room for accessories ensures convenience.
- Enhanced Functionality: Packed with handy features, including a 5x9" precision tracking mouse pad and a built-in phone slot for seamless work or video calls. Plus, enjoy laptop support with the integrated device ledge.
- Cool Comfort: Enjoy a stable surface with our lap desk's dual bolster cushion, designed for comfort and airflow, keeping your lap cool during extended use.
- Durable Surface: Work with confidence on our lap desk's solid surface, featuring a blush pink color, ensuring optimal air circulation to prevent your laptop from overheating.
- On-the-Go Convenience: With an integrated handle and lightweight design (2.14 lbs), our lap desk is portable for travel or moving around the house, offering flexibility in any space.
Check whether another account owns the file
If XAMPP was first run by a different Windows account, the file may be owned or permissioned for that account. An administrator can inspect Properties > Security > Advanced and add the account that actually runs XAMPP, granting only Modify. Avoid replacing permissions on the whole XAMPP tree unless you understand the effect on service and application files.
Test from a writable installation path only as a last resort
If the installation is under C:Program Files and the organization’s policy prevents a suitable file-level ACL, reinstalling or moving XAMPP to a user-writable folder can remove that particular restriction. Back up your htdocs, database data, configuration changes, and certificates first, and treat the move as a migration rather than a quick repair.
Free tools Windows power users keep installed
One-click scans. No signup required.
Can I prevent the error from returning?
- Keep a backup of important XAMPP configuration and project data before changing permissions or deleting the INI.
- Use one Windows account consistently for the Control Panel, especially on shared computers.
- Do not copy a replacement INI from another computer without checking its permissions and saved paths.
- After Windows, XAMPP, or security-policy changes, perform one clean stop-and-exit test before relying on the setup.
- Use administrator elevation for service installation or removal, but prefer a narrow INI permission for routine panel writes when policy allows.
If you want an optional shortcut after trying the manual steps, Outbyte PC Repair can check and fix more than 100 common Windows issues where possible, including broken system elements and shared DLL problems, while also offering cleanup, privacy checks, vulnerability checks, a real-time boost, file shredding, and an app-crash log. It runs on Windows 11, 10, 8, and 7; a category-based free trial lasts at least two days before a paid subscription. It complements antivirus software rather than replacing it, results vary, and no tool repairs every crash.
What is the safest overall approach?
Start with an elevated launch, then use a Write or Modify permission on only xampp-control.ini if you need a permanent non-elevated workflow. Recreate the file only after backing up your settings, and avoid disabling UAC because the narrower fixes address the same restriction without weakening Windows security.
Frequently Asked Questions
Will this error damage my Apache or MySQL data?
The message concerns the Control Panel’s settings file, not the database files or web-root content. A normal permission repair does not delete project files, but always stop services and make a backup before deleting or recreating the INI.
Why does XAMPP work until I close it?
Starting services can require only read access to the panel configuration, while closing the panel triggers a write to save its state. That is why Apache may serve pages normally even though the exit operation is denied.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsDo I need to reinstall XAMPP to fix xampp-control.ini?
Usually not. Elevating the executable or granting the active Windows account Modify permission on the single INI file addresses the common cause without touching your web files or databases.
What happens to my XAMPP settings if I recreate the INI?
The replacement may restore default Control Panel preferences, so custom selections can be lost. Keep a copy of the old file and reapply settings manually after confirming the new file works.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

