File system troubleshooting

File System gateway setup and troubleshooting

Troubleshoot local and network file paths, gateway service account access, UNC paths, mapped drives, permissions, and file-system connector connection tests.

File SystemFast

Use this guide when

  • File System connector cannot access a folder
  • A path works interactively but fails in Power Automate
  • Mapped drive paths fail through the gateway
  • Generated file/document actions need a local or network share target

Prerequisites

  • The File System connector is available in your environment and uses an on-premises data gateway.
  • The folder path is reachable from the gateway machine.
  • The configured credential or gateway service account has read/write permissions as required.
  • Network shares use stable UNC paths instead of user-specific mapped drive letters.

Fast checks before you debug

  • Prefer \server\share\folder over Z:\folder because mapped drives are user-session specific.
  • If the gateway runs as a service account, test permissions under that account, not only as your logged-in admin user.
  • Create folders ahead of time and keep test files small while validating the connector.
  • Confirm antivirus, DLP, or file locks are not blocking writes.

Step-by-step diagnostics

Test the path from the gateway machine

Open PowerShell on the gateway host and test the exact UNC path that Power Automate will use. A local path works only if it is local to the gateway host.

Test-Path '\\server\share\folder'
Get-ChildItem '\\server\share\folder' | Select-Object -First 5
Confirm the runtime account can access the folder

If the gateway service runs as a specific service account, validate that account has NTFS and share permissions. Interactive administrator access is not enough.

Replace mapped drives with UNC paths

Mapped drives are tied to a user session. Power Automate and the gateway service may not see them. Use UNC paths in connection setup and generated flow values.

net use
whoami
Run a minimal create/read file flow

Before importing a larger generated workflow, build a temporary instant flow that creates a small test file and then reads it back using the same connection/path.

Common errors and fixes

The folder path works in File Explorer but fails in Power Automate.
Likely cause
The path is a mapped drive or was tested under a different user than the gateway runtime.
Fix
Use a UNC path and grant the gateway runtime or configured credential both share and NTFS permissions.
Create file succeeds but update/delete fails.
Likely cause
The account has read/create rights but lacks modify/delete rights or the file is locked.
Fix
Review NTFS/share permissions and test a minimal update/delete action with a new file.
Connection succeeds but generated document path fails.
Likely cause
The generated path contains invalid characters, missing folders, or source workflow variables that resolve differently in Power Automate.
Fix
Normalize file names, create required folders, and validate dynamic path expressions after import.

Power Automate connection fields

FieldUse this value
Root folderUNC path reachable from the gateway host, for example \server\share\folder.
AuthenticationCredential with both share and NTFS permissions for the needed operations.
GatewayGateway host that can access the file path and network share.

Validation checklist

  • UNC path is reachable from the gateway host.
  • The gateway/runtime credential has required read/write/delete permissions.
  • A minimal create/read/update/delete file flow succeeds.
  • Generated file names and folder paths are sanitized and validated after import.
  • Large file and locked-file behavior is tested separately for production workflows.

Related gateway guides