2026 Windows Server 2025 IIS File Write Denied: What to Do?

2026 Windows Server 2025 IIS File Write Denied: What to Do?

An IIS site responds, but an upload or log write fails with “Access denied.”

Fastest fix: identify the site’s application pool identity and the exact path in the error, then grant that identity only the required permission. For a network share, verify the account used for remote access and check both share and NTFS permissions; do not use Everyone or an administrator account to hide the mismatch.

This guide is for Windows Server administrators configuring IIS permissions.
.NET developers can use it to distinguish the application process from the signed-in user.
Operations staff responsible for uploads, logs, and shared files can follow the repair and verification steps.

Start with the process identity, not the person signed in

IIS runs a website’s application code under a process identity. That identity is not automatically the administrator who opened IIS Manager, nor is it necessarily the account associated with an incoming web request. Microsoft’s application pool identity guidance describes the pool’s separate identity and how it can be granted local file-system access.

Begin in IIS Manager:

  1. Open Sites, select the site that reports the error, and choose Basic Settings in the Actions pane.
  2. Note the Application pool assigned to that site. If the affected application is configured as a separate IIS application, check its pool as well.
  3. Select Application Pools, select the pool you identified, and open Advanced Settings.
  4. Under Process Model, inspect Identity. The default is commonly ApplicationPoolIdentity, but the pool could use a custom account instead. The IIS process model reference documents the setting.

With the default identity, the local Windows account name used for an ACL entry follows this form:

IIS AppPool\PoolName

Replace PoolName with the exact application pool name. If the pool uses a custom identity, use that account instead. Do not assume a pool name from the site name; they can differ.

You can also inspect application-to-pool assignments from an elevated command prompt:

%windir%\system32\inetsrv\appcmd.exe list app

AppCmd reports IIS application configuration, including the pool assigned to an application. Use the official AppCmd command guide if you need to inspect or manage IIS configuration from the command line.

Keep the identities separate: an application pool identity runs the application process. Anonymous authentication or impersonation can affect which identity is used for a particular request or operation. If the pool’s permissions look correct, verify the application’s authentication settings before changing the ACL.

For an ASP.NET Core IIS application, do not infer file-system access from the fact that the site starts or returns a page. The application may be able to read its deployed files while lacking permission to write to an upload or log directory. Microsoft’s ASP.NET Core publishing guidance for IIS covers the IIS hosting setup; the application’s own file operations still need to be checked against the identity that performs them.

Match the error to the path and operation

Before changing permissions, record the full path reported in the application log or exception and the operation that failed. “Access denied” without a path is not enough to decide which folder should be writable.

Check whether the error concerns:

  • A deployed application file that the site reads.
  • An upload folder that receives new files.
  • A log directory where the application creates or updates log files.
  • A user-specific configuration or profile location.
  • A remote path accessed through a network share.

A website that serves a page successfully may only need read access to its application files. That does not prove it can create a file in a separate upload directory. Likewise, a failure to read configuration while IIS loads the site is different from an application operation that fails after the site is running. Do not treat an IIS configuration-file error such as HTTP 500.19 as the same problem as a write attempt rejected by the target directory.

Use this mapping to keep the investigation focused:

Observed target Identity to verify first Permission question
Local application or upload folder The pool identity, or a configured custom identity Does that identity have the required access on this folder?
Operation affected by anonymous authentication or impersonation The identity actually used for that request or operation Is the application acting as the pool identity or another account?
Folder on a network share The identity presented to the remote file server Does that identity pass both the share and NTFS checks?
User-specific profile or configuration location The account and profile context used by the application Does the application rely on a user profile that is unavailable or configured differently?

The IIS identity troubleshooting guidance explains how application-pool, anonymous, and impersonated identities can differ. This distinction matters when a site is reachable but a particular file operation still fails.

Grant only the access needed on a local folder

For a local path, use File Explorer first so the account and inherited entries are visible.

  1. Browse to the exact directory from the error.
  2. Right-click it and select Properties → Security → Edit.
  3. Select Add, enter the actual account, and use Check Names to confirm Windows resolves it.
  4. Grant only the required access. A folder where the application creates, updates, or deletes files may need Modify. A folder used only to read static files generally does not need write access.
  5. Apply the change to the intended folder and its contents only where the application needs that scope.

Avoid granting permissions to the whole site root just because one subfolder receives uploads. Keep application binaries and read-only resources narrower than folders that hold changing data. Do not grant Full Control unless a documented application requirement calls for it and the scope has been reviewed.

You can inspect an ACL in PowerShell before editing it:

Get-Acl -LiteralPath 'D:\Sites\ExampleApp\Uploads' |
    Format-List Path, AccessToString

The Get-Acl command reference documents how to retrieve security descriptors for a path. To inspect a folder from Command Prompt, use:

icacls "D:\Sites\ExampleApp\Uploads"

Microsoft’s icacls reference documents the command and its permission syntax. If you need to add Modify access to a specific local upload directory for a default pool identity, a scoped example is:

icacls "D:\Sites\ExampleApp\Uploads" /grant "IIS AppPool\ExamplePool:(OI)(CI)M"

Here, substitute the real path and pool name. (OI)(CI) applies the entry to files and subfolders, while M means Modify. Review the target path and identity before running the command. Do not add /T or broaden the path automatically: recursive changes can affect existing contents beyond the intended application directory.

Permission change Appropriate use Avoid when
Read access on application files The application needs to load or serve files without changing them The application must create or update files in a separate data folder
Modify on a dedicated data folder The application needs to create, update, or delete its own files there The target contains deployed code or unrelated data that does not need writes
Full Control on the site tree Only if a specific, reviewed requirement needs control over ACLs or ownership As a troubleshooting shortcut for an ordinary upload or log failure
Access for Everyone or an administrator group Not a least-privilege repair for an application identity mismatch As a substitute for identifying the actual process or remote identity

The objective is not to make the error disappear by allowing every account to write. It is to give the identity that performs the operation enough access to that particular resource, and no more.

Treat network shares as a separate permission boundary

A local ACL entry for IIS AppPool\PoolName does not automatically give that identity access to a remote server. With the default virtual application-pool identity, network access may use the web server’s computer account in a domain environment. A custom pool identity or impersonation can result in a different account. Confirm the identity actually presented to the remote system instead of copying a local ACL assumption to the share.

For a network target, check both permission layers:

Check Where to inspect What must allow the operation
Share permissions The shared folder’s sharing permissions, or an approved administrative tool The remote identity needs the required access at the share level
NTFS permissions Properties → Security on the folder on the file server The same identity needs the required file-system access
Effective result Both permission layers together The operation must be allowed by both; a restrictive layer can still deny it

Microsoft’s share and NTFS permissions guidance covers the two-layer model. The Get-SmbShareAccess reference can help an administrator inspect share-level access, but it does not replace checking the folder’s NTFS ACL.

If a default pool identity is used, the remote file server may need to authorize the web server’s computer account, where the environment supports that arrangement. If a custom domain identity is used, verify that account’s access at both layers. If the application uses impersonation or a separate anonymous account, establish which identity performs the file operation before modifying permissions. Avoid storing a person’s interactive credentials in an application configuration simply to make a share write succeed.

Use a repair-and-verification sequence

Follow these milestones in order. Record the original ACL and the identity before changing anything so the change can be reviewed or reversed.

Milestone: capture the failure

  • Reproduce the original upload, log write, or file read if it is safe to do so.
  • Record the full path, the operation, the application log entry, and the time of failure.
  • Confirm whether the path is local or a UNC path to a share.

Milestone: identify the executing identity

  • Map the affected IIS application to its application pool.
  • Inspect the pool’s Process Model identity.
  • Check anonymous authentication, impersonation, and any custom account used by the application.
  • For a share, verify the remote identity with the administrator responsible for that file server.

Milestone: inspect the existing authorization

  • Use File Explorer’s Security tab to review local NTFS access.
  • Use Get-Acl or icacls to record the local ACL if command-line review is appropriate.
  • For a share, check share permissions and the underlying NTFS permissions separately.
  • Preserve the existing entries; do not remove inherited or service permissions without understanding their purpose.

Milestone: make the narrowest change

  • Add the identified identity to the directory that actually requires access.
  • Choose Read for read-only needs or Modify when the application must create or change files.
  • Keep writable data separate from application binaries where the application design permits.
  • Change only the relevant share and NTFS entries for remote paths.

Milestone: retest the original operation

  • Repeat the same upload, log write, or read that failed. A page-load test alone does not prove that the file operation works.
  • Check the application log for the same path and access-denied error.
  • If the failure persists, return to the identity and path checks rather than broadening permissions.
  • Save the before-and-after ACL record with the change notes.

  • [ ] The affected IIS application and its pool have been identified.

  • [ ] The actual process or request identity has been confirmed.
  • [ ] The full failed path and file operation have been recorded.
  • [ ] Local NTFS permissions, or both share and NTFS permissions, have been checked.
  • [ ] Only the required access was granted to the identified account.
  • [ ] The original business operation now succeeds, and its error has been rechecked.
  • [ ] The ACL change is documented so it can be reviewed after a pool rename, migration, or deployment-path change.

This checklist is also useful after deployment changes. A replacement directory can have different ACLs from the previous one, and renaming an application pool changes the account name used for a IIS AppPool\PoolName entry. Recheck permissions after those changes instead of assuming an earlier ACL still matches.

Interpret “permissions look right” without widening access

If the ACL appears correct but the application still receives an access-denied error, revisit the chain in order:

  • Wrong pool: The site or nested IIS application may be assigned to a different application pool than expected.
  • Different request identity: Anonymous authentication or impersonation may make the operation run under another account.
  • Different target: The application may write to a configured path, log location, or profile directory that differs from the path assumed during deployment.
  • Remote identity mismatch: The identity allowed on the web server may not be the one that reaches the file server.
  • Missing access on one layer: A share can permit access while the NTFS ACL denies it, or the reverse.
  • Deployment drift: A newly created directory may not have inherited the permissions of the original directory.

For ASP.NET Core IIS, check application logging and configuration to establish the path and operation rather than guessing from the page behavior. If the application needs a user profile, verify that requirement separately; granting write access to the entire site does not resolve a profile configuration problem. Keep a configuration-load failure such as HTTP 500.19 distinct from an application-level write denial, since the failing component and the relevant resource can differ.

At each point, ask: which identity performed this operation, which exact object did it access, and which authorization layer rejected it? That gives a testable next step. Adding administrators or Everyone may hide the original cause while leaving the application’s real identity and access model unresolved.

After the permission change is verified, the remaining decision is whether the server environment matches the application’s deployment requirements. Shared virtual machines can introduce shared-resource contention, and a provider-managed environment may limit control over the operating system or storage layout. If the IIS workload needs dedicated hardware and ongoing Windows Server operation, compare those trade-offs with an IronStp dedicated server. Check the available server options and ordering details and published pricing information for the Windows versions, languages, and options currently listed. The permission procedure above remains an application-side task; it does not imply that server rental includes IIS troubleshooting or managed operations.

Deploy Your IIS Workload on Dedicated AMD Hardware

Choose an IronStp AMD EPYC server with 32 cores and 128GB or 256GB of dedicated ECC memory.

Configure a Dedicated Server

Choose memory, storage, bandwidth, and OS to suit the workload. The configuration page shows the amount due for the current billing period.