Problem
You’re working with a configured external volume that has an S3 bucket path in Unity Catalog. When you try to use the UI to access or view files inside a parent directory or subdirectory, you receive an error message.
The directory being accessed is not found
However, when you try to access the files in the same directory or subdirectory directly in the S3 bucket, or by listing objects using the $fs ls command in a notebook, you are able to see the files.
Cause
You created a file or files directly in S3 with the same name as the directory or directories, in the same location. This can lead to conflicts and prevent correct directory access in Databricks.
Solution
- Identify the conflicting file(s) with the same name as the directory.
- Rename or delete the conflicting file(s) to avoid conflicts with the directory name(s).
- Try again to access the directory or directories.
Preventive measures
- If you need to create a file with the same name, consider adding a prefix or suffix to distinguish it from the directory.
- Avoid creating files and directories with the same name in the same location.
- Regularly review and clean up your S3 bucket.