'Disable directory listing in artifactory

I need to Disable directory listing in . Any suggestions ? I tried to search for result in google but didn't find any I only found a way that you can block the connection to the URL but this isn't what i need



Solution 1:[1]

If you are looking to disable the directory-listing for particular users, then you can achieve this by adding providing the repository path exclude-pattern at the permission target end.

In the below example, I have enabled anonymous user access only to specific packages, Please refer below steps for the same:

  1. I have created a PyPI local repository, deployed python packages into it as shown in the below screenshot: screenshot

  2. After this, created a permissions target to restrict access to a specific folder called st-fraud-infra to the anonymous user. Hence added st-fraud-infra/** as a exclude pattern, kindly refer to the below screenshot for the same: screenshot

  3. Add anonymous users from the Users tab and provided appropriate permissions based on your requirement. screenshot

  4. Once you saved the permission target while accessing the Artifactory through the anonymous user, I could not see the excluded folder which is st-fraud-infra. screenshot

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Pavan Gonugunta