ARTIFACTORY: How to Resolve "Parent must be a folder" Error in Artifactory Generic Remote Repositories

Products
Frog_Artifactory
Content Type
Use_Case
AuthorFullName__c
Harish Gowda, Derek Pang, Mohammad Tibi
articleNumber
000004031
FirstPublishedDate
2017-08-28T17:34:38Z
lastModifiedDate
2026-08-05

ARTIFACTORY: How to Resolve "Parent must be a folder" Error in Artifactory Generic Remote Repositories

Introduction
When attempting to download an artifact from a generic remote repository, users may encounter a 400 Bad Request error (or sometimes a 404 in certain client views) with the message: "Rejected artifact download request: Parent must be a folder."
This behavior is not caused by an issue with the generic remote repository itself. Instead, it typically occurs due to an incorrect or incomplete artifact path in the request. In some cases, a parent path may also be cached as a file rather than a directory, leading to the same error.


Resolution
This typically occurs during a download attempt where a preceding directory in the path has already been cached as a file rather than a folder. After clearing the cache and retrying, the package was downloaded successfully. This behavior is currently expected in generic remote repositories.
  • Generic repositories do not have a fixed layout or metadata to define what is a "folder" versus a "file" on the remote server.
  • If a user or script attempts to download a directory path (e.g., .../vault) and the remote server returns an HTML index page, Artifactory caches that HTML content as a file named vault.
  • Subsequent requests for nested items (e.g., .../vault/1.21.3/item.zip) will fail because Artifactory cannot create a child item under what it already identifies as a single file


Step-by-Step Instructions:


1. Identifying the Error in Logs : We will see the following error pattern in the artifactory-service.log:
[ERROR] [...] [o.a.r.HttpRepo:1858] - <REPO_NAME>: Failed to download '...'. Received status code
200 and caught exception: Parent must be a folder [WARN ] [...] [.r.ArtifactoryResponseBase:158] -
Sending HTTP error code 400: Rejected artifact download request: Parent must be a folder


2. Resolving the Blocked Path
  1. Log into the Artifactory UI.
  2. Navigate to Application > Artifactory > Artifacts.
  3. Locate the Generic Remote Repository and find the file that is incorrectly occupying the folder's name (the "parent" mentioned in the error).
  4. Delete this cached file from the repository cache.
  5. Retry the download for the specific, nested artifact
curl -u admin:Token -L -O "http://<artifactory-url>/artifactory/generic-remote/vault/<TargetPath>"
Conclusion
To avoid this issue, ensure that automated scripts or curl commands do not attempt to download directory paths that return HTML content, as this triggers the "file-as-folder" caching behavior. Always target the direct URL of the intended binary