<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Unable to access files using a classic cluster in Data Engineering</title>
    <link>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149731#M53164</link>
    <description>&lt;P&gt;I used the same code with the classic cluster (RunTime 17.3LTS ML, with spark config: "spark.databricks.workspace.fileSystem.enabled true"), not able to access files in workspace with the following &lt;STRONG&gt;python code&lt;/STRONG&gt;:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Check if source exists and what's in it&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;src &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"/Workspace/Users/xxx@xxxxxx.com/reporting/R/utils"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Source exists: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;os.path.&lt;/SPAN&gt;&lt;SPAN&gt;exists&lt;/SPAN&gt;&lt;SPAN&gt;(src)&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Source contents: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;os.&lt;/SPAN&gt;&lt;SPAN&gt;listdir&lt;/SPAN&gt;&lt;SPAN&gt;(src) &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; os.path.&lt;/SPAN&gt;&lt;SPAN&gt;exists&lt;/SPAN&gt;&lt;SPAN&gt;(src) &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt; &lt;SPAN&gt;'N/A'&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source exists: True &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source contents: []&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, using serverless compute, the result is:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source exists: True &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source contents: ['aaa_helpers.R', 'write_metadata.R', 's3_helpers.R', '.gitkeep']&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Therefore, the files can be accessed using the python code, but not able to be accessed using the classic cluster. Could anyone point out why? Thanks a lot.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
    <pubDate>Tue, 03 Mar 2026 19:16:32 GMT</pubDate>
    <dc:creator>NW1000</dc:creator>
    <dc:date>2026-03-03T19:16:32Z</dc:date>
    <item>
      <title>Unable to access files using a classic cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149731#M53164</link>
      <description>&lt;P&gt;I used the same code with the classic cluster (RunTime 17.3LTS ML, with spark config: "spark.databricks.workspace.fileSystem.enabled true"), not able to access files in workspace with the following &lt;STRONG&gt;python code&lt;/STRONG&gt;:&amp;nbsp;&lt;/P&gt;&lt;DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;import&lt;/SPAN&gt;&lt;SPAN&gt; os&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;# Check if source exists and what's in it&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;src &lt;/SPAN&gt;&lt;SPAN&gt;=&lt;/SPAN&gt; &lt;SPAN&gt;"/Workspace/Users/xxx@xxxxxx.com/reporting/R/utils"&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Source exists: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;os.path.&lt;/SPAN&gt;&lt;SPAN&gt;exists&lt;/SPAN&gt;&lt;SPAN&gt;(src)&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;print&lt;/SPAN&gt;&lt;SPAN&gt;(&lt;/SPAN&gt;&lt;SPAN&gt;f&lt;/SPAN&gt;&lt;SPAN&gt;"Source contents: &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;SPAN&gt;os.&lt;/SPAN&gt;&lt;SPAN&gt;listdir&lt;/SPAN&gt;&lt;SPAN&gt;(src) &lt;/SPAN&gt;&lt;SPAN&gt;if&lt;/SPAN&gt;&lt;SPAN&gt; os.path.&lt;/SPAN&gt;&lt;SPAN&gt;exists&lt;/SPAN&gt;&lt;SPAN&gt;(src) &lt;/SPAN&gt;&lt;SPAN&gt;else&lt;/SPAN&gt; &lt;SPAN&gt;'N/A'&lt;/SPAN&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;STRONG&gt;Result:&lt;/STRONG&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source exists: True &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source contents: []&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;However, using serverless compute, the result is:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source exists: True &lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Source contents: ['aaa_helpers.R', 'write_metadata.R', 's3_helpers.R', '.gitkeep']&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;SPAN&gt;Therefore, the files can be accessed using the python code, but not able to be accessed using the classic cluster. Could anyone point out why? Thanks a lot.&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 03 Mar 2026 19:16:32 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149731#M53164</guid>
      <dc:creator>NW1000</dc:creator>
      <dc:date>2026-03-03T19:16:32Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access files using a classic cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149737#M53166</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/182577"&gt;@NW1000&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I think you are seeing a permissions/identity difference between the two compute types, not a path or runtime issue.&lt;/P&gt;
&lt;UL class="p8i6j07 p8i6j02"&gt;
&lt;LI class="p8i6j0a"&gt;
&lt;P class="p8i6j01 paragraph"&gt;On serverless interactive, the cluster runs as you, so it inherits your workspace permissions and can see everything under&lt;BR /&gt;&lt;SPAN&gt;/Workspace/Users/xxx@xxxxxx.com/reporting/R/utils&lt;/SPAN&gt;&lt;BR /&gt;&lt;FONT color="#993300"&gt;os.listdir&lt;/FONT&gt; shows your R files.&lt;/P&gt;
&lt;/LI&gt;
&lt;LI class="p8i6j0a"&gt;
&lt;P class="p8i6j01 paragraph"&gt;On your classic cluster, the code is likely running under a different principal (for example, a shared/standard cluster, or a job cluster “run as” a service principal). That identity either:&lt;/P&gt;
&lt;OL class="p8i6j08 p8i6j02"&gt;
&lt;LI class="p8i6j0a"&gt;doesn’t have read permission on your home folder, or&lt;/LI&gt;
&lt;LI class="p8i6j0a"&gt;only has very limited access there.&lt;/LI&gt;
&lt;/OL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P class="p8i6j01 paragraph"&gt;In that case, the directory itself exists (so &lt;FONT color="#993300"&gt;os.path.exists&lt;/FONT&gt; is True), but the listing returns an empty result for that principal.&lt;/P&gt;
&lt;P class="p8i6j01 paragraph"&gt;Try the below.&lt;/P&gt;
&lt;OL&gt;
&lt;LI class="p8i6j01 paragraph"&gt;Run on a single‑user (dedicated) cluster whose user is the same as the owner of &lt;EM&gt;/Workspace/Users/xxx@xxxxxx.com&lt;/EM&gt;, &lt;BR /&gt;or&lt;/LI&gt;
&lt;LI class="p8i6j01 paragraph"&gt;Move the files to a shared workspace folder and grant permissions.. and then point your code there to see if that helps address te problem.&lt;/LI&gt;
&lt;/OL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;STRONG&gt;&lt;FONT size="2" color="#FF6600"&gt;&lt;I&gt;If this answer resolves your question, could you mark it as “Accept as Solution”? That helps other users quickly find the correct fix.&lt;/I&gt;&lt;/FONT&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P class="p1"&gt;&lt;I&gt;Regards,&lt;/I&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 21:59:18 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149737#M53166</guid>
      <dc:creator>Ashwin_DSA</dc:creator>
      <dc:date>2026-03-03T21:59:18Z</dc:date>
    </item>
    <item>
      <title>Re: Unable to access files using a classic cluster</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149741#M53168</link>
      <description>&lt;P&gt;Did not realize despite the user is in the group which is assigned to the classic cluster, the workspace access is still not available. Thank you for your help!&lt;/P&gt;</description>
      <pubDate>Tue, 03 Mar 2026 23:29:40 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/149741#M53168</guid>
      <dc:creator>NW1000</dc:creator>
      <dc:date>2026-03-03T23:29:40Z</dc:date>
    </item>
    <item>
      <title>Hi @NW1000, This behavior comes down to how workspace fil...</title>
      <link>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/150358#M53393</link>
      <description>&lt;P&gt;Hi &lt;a href="https://community.databricks.com/t5/user/viewprofilepage/user-id/182577"&gt;@NW1000&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;This behavior comes down to how workspace file access and identity work differently between serverless compute and classic clusters.&lt;/P&gt;
&lt;P&gt;SERVERLESS COMPUTE&lt;BR /&gt;
Serverless interactive compute runs under your own identity. It inherits your workspace permissions directly, so os.listdir() on /Workspace/Users/you@example.com/... returns everything you personally have access to.&lt;/P&gt;
&lt;P&gt;CLASSIC CLUSTERS AND ACCESS MODE&lt;BR /&gt;
On a classic cluster, the effective identity depends on the cluster's access mode:&lt;/P&gt;
&lt;P&gt;1. Single User (Assigned) mode: the cluster runs as the assigned user, and that user's permissions apply to workspace files. If the cluster is assigned to you, it works the same as serverless.&lt;/P&gt;
&lt;P&gt;2. Shared mode (formerly "Shared" or "No Isolation Shared"): the cluster may run code under a different security context. In this mode, direct filesystem access to /Workspace paths can be restricted, and os.listdir() may return empty results even though os.path.exists() returns True. The directory is visible, but the listing is filtered by the effective principal's permissions.&lt;/P&gt;
&lt;P&gt;3. No Isolation Shared mode (legacy): similar restrictions apply.&lt;/P&gt;
&lt;P&gt;WHY os.path.exists() RETURNS TRUE BUT os.listdir() IS EMPTY&lt;BR /&gt;
The /Workspace mount point is visible to all compute types, so the path itself resolves. However, the file listing is governed by workspace-level ACLs tied to the running identity. If the identity does not have CAN_READ on the individual files or the folder contents, the listing comes back empty.&lt;/P&gt;
&lt;P&gt;HOW TO FIX THIS&lt;/P&gt;
&lt;P&gt;Option 1: Use a Single User cluster assigned to your account. This ensures the cluster identity matches your workspace permissions. In the cluster configuration, set Access Mode to "Single User" and assign your user.&lt;/P&gt;
&lt;P&gt;Option 2: Move the files to a Shared workspace folder (e.g., /Workspace/Shared/reporting/R/utils) and grant appropriate permissions to the group or users who need access. You can set folder-level permissions in the Workspace browser by right-clicking the folder and selecting "Permissions."&lt;/P&gt;
&lt;P&gt;Option 3: If you need to use a Shared cluster, consider storing the files in a Unity Catalog Volume instead of the workspace filesystem. Volumes provide fine-grained access control that works consistently across all compute types:&lt;/P&gt;
&lt;PRE&gt;spark.read.text("/Volumes/catalog/schema/volume_name/utils/aaa_helpers.R")&lt;/PRE&gt;
&lt;P&gt;RELEVANT DOCUMENTATION&lt;BR /&gt;
- Workspace files: &lt;A href="https://docs.databricks.com/files/workspace.html" target="_blank"&gt;https://docs.databricks.com/files/workspace.html&lt;/A&gt;&lt;BR /&gt;
- Cluster access modes: &lt;A href="https://docs.databricks.com/compute/configure.html#access-mode" target="_blank"&gt;https://docs.databricks.com/compute/configure.html#access-mode&lt;/A&gt;&lt;BR /&gt;
- Unity Catalog Volumes: &lt;A href="https://docs.databricks.com/volumes/index.html" target="_blank"&gt;https://docs.databricks.com/volumes/index.html&lt;/A&gt;&lt;BR /&gt;
- Workspace ACLs: &lt;A href="https://docs.databricks.com/security/access-control/workspace-acl.html" target="_blank"&gt;https://docs.databricks.com/security/access-control/workspace-acl.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Your Spark config setting (spark.databricks.workspace.fileSystem.enabled true) enables the workspace filesystem FUSE mount on classic clusters, which you already have. The issue is purely about the identity and permissions, not the mount itself.&lt;/P&gt;
&lt;P&gt;* This reply used an agent system I built to research and draft this response based on the wide set of documentation I have available and previous memory. I personally review the draft for any obvious issues and for monitoring system reliability and update it when I detect any drift, but there is still a small chance that something is inaccurate, especially if you are experimenting with brand new features.&lt;/P&gt;
&lt;P&gt;If this answer resolves your question, could you mark it as "Accept as Solution"? That helps other users quickly find the correct fix.&lt;/P&gt;</description>
      <pubDate>Mon, 09 Mar 2026 05:59:24 GMT</pubDate>
      <guid>https://community.databricks.com/t5/data-engineering/unable-to-access-files-using-a-classic-cluster/m-p/150358#M53393</guid>
      <dc:creator>SteveOstrowski</dc:creator>
      <dc:date>2026-03-09T05:59:24Z</dc:date>
    </item>
  </channel>
</rss>

