An Azure service for ingesting, preparing, and transforming data at scale.
Hi Bhupinder Singh,
The error “SftpPermissionDenied” means the SFTP server is blocking access to specific files. Azure Data Factory can connect, but when it encounters a file where your SFTP user does not have read permission, the Copy activity fails immediately.
Fault‑tolerance in Copy Activity only works for text-based formats (CSV/JSON/Parquet). It does not skip binary files or SFTP permission errors. Because of this, ADF cannot ignore restricted SFTP files automatically.
To migrate all accessible files and skip restricted ones, you need to build a pipeline that copies files one by one and continues even if a single file fails. A common solution is:
- Use Get Metadata (childItems = true, recursive = true) to list all files and folders.
- Add a ForEach loop over the returned items.
- For each file, run a Copy Data activity (or child pipeline) and enable Continue on error.
- This lets the pipeline skip only the restricted files.
- Use PreserveHierarchy or dynamic file paths so the folder structure is kept intact in ADLS.
This pattern gives you:
- Per‑file isolation (one failure doesn’t stop the pipeline)
- Full folder structure preserved
- Restricted files automatically skipped
If you know restricted file patterns, you can also add a Filter activity before the loop to exclude them earlier.
Helpful References:
https://dori-uw-1.kuma-moon.com/en-us/azure/data-factory/copy-activity-fault-tolerance
https://dori-uw-1.kuma-moon.com/en-us/azure/data-factory/connector-sftp?tabs=data-factory
Hope this helps. Please let us know if you have any questions or concerns. If this solves your issue, kindly click “Accept Answer” so it can help others in the community.