# Can't access certain network drive when using localFileSystem.getEntryWithUrl

**URL:** <https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619>\
**Category:** UXP Plugin API\
**Tags:** bug, javascript\
**Created:** [August 4, 2023, 2:06pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619 "2023-08-04T14:06:12Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 4, 2023, 2:06pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/1 "2023-08-04T14:06:12Z")

</div>

When trying to access a drive called `\\OO-AA1` (zo not the usual Z:/ or something alike)

We get an error, file not found, and if you look at the error it doesn’t show the drive in the path.  
`\\OO-AA1\Profiles$\t\` would turn into `file:///Profiles$/t/`

The path is accessible from Explorer and such, although it’s not visible from “Your pc” like the Z drive is.

---

<div class="post-metadata">

**Author:** ![dotproduct](https://avatars.discourse-cdn.com/v4/letter/d/258eb7/32.png) [@dotproduct](https://forums.creativeclouddeveloper.com/u/dotproduct)\
**Post date:** [August 4, 2023, 3:05pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/2 "2023-08-04T15:05:40Z")

</div>

Just to rule out more obvious access issues, are you able to access random files on your local drive? And just to confirm you have all the right settings in your manifest, etc. like it has been mentioned over and over in various threads in the forum (e.g. [this](http://forums.creativeclouddeveloper.com/t/state-of-arbitrary-file-access-and-shell-command-support/5720) one or [this](http://forums.creativeclouddeveloper.com/t/getentrywithurl-not-accepting-valid-path/5927))?

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 4, 2023, 6:01pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/3 "2023-08-04T18:01:43Z")

</div>

Regarding your first question, I can open random files, or the files specified in my script yeah? Or am I misunderstanding you.

Regarding the manifest, don’t have one, it’s a script and not a plugin.  
The root cause feels to me like is a Photoshop bug, based on how it removes the drive, in this case network drive from the path.

I’ll try to rewrite it using Node FS, maybe that works?

---

<div class="post-metadata">

**Author:** ![dotproduct](https://avatars.discourse-cdn.com/v4/letter/d/258eb7/32.png) [@dotproduct](https://forums.creativeclouddeveloper.com/u/dotproduct)\
**Post date:** [August 4, 2023, 6:39pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/4 "2023-08-04T18:39:24Z")

</div>

My question was, if you were able to invoke `localFileSystem.getEntryWithUrl` successfully in any other case. To be honest, I’m not entirely sure that UXP allows random file access in **scripts** (vs. plugins, that can request that permission via manifest). Similarly I don’t think Node FS is available in UXP, only UXP’s own fs module, but again not sure if that is available in a script (vs. plugin). Maybe someone from Adobe can confirm that.

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 6, 2023, 9:53am UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/5 "2023-08-06T09:53:37Z")

</div>

Yes you can open any file with local filesystem.getEntryWithUrl, scripts have access to all files unlike plugins.

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 7, 2023, 12:38pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/6 "2023-08-07T12:38:54Z")

</div>

The issue most likely is permission related  
Within Java and normal NodeJS FS I can read the file without problems.

Just not possible when in a script. I can try to convert it into a plugin, but honestly no clue how much time that takes.

Or alternatively, it can still be a bug in the UXP API.  
See:

> We get an error, file not found, and if you look at the error it doesn’t show the drive in the path.  
> `\\OO-AA1\Profiles$\t\` would turn into `file:///Profiles$/t/`

the OO-AA1 is the drive path, so yea that’s absolutely required.

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 7, 2023, 1:23pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/7 "2023-08-07T13:23:35Z")

</div>

![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/3/3241a1ebdf7a028f16b3a26d18674a6730aede26.png)

When using a manifest, i get the same error, notice how the drive again got removed…

---

<div class="post-metadata">

**Author:** ![Timothy\_Bennett](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/timothy_bennett/32/1251_2.png) [@Timothy\_Bennett](https://forums.creativeclouddeveloper.com/u/Timothy_Bennett)\
**Post date:** [August 7, 2023, 1:43pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/8 "2023-08-07T13:43:34Z")

</div>

In terms of converting to a plugin - if all you want is a button to trigger a script it would be super easy to adapt the vanilla starter.

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 7, 2023, 1:47pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/9 "2023-08-07T13:47:59Z")

</div>

I’d want it to trigger by CMD, but that’s another issue.

If I can’t open those kind of network drives the script isn’t possible to work without a restructure of our organisations infrastructure.

And after trying, with using a manifest with fullAccess to the localFileSystem, it still doesn’t work so it’s not very helpfu.

---

<div class="post-metadata">

**Author:** ![sttk3](https://avatars.discourse-cdn.com/v4/letter/s/958977/32.png) [@sttk3](https://forums.creativeclouddeveloper.com/u/sttk3)\
**Post date:** [August 7, 2023, 2:22pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/10 "2023-08-07T14:22:57Z")

</div>

I was also under the impression that this was either a bug or not supported. Formats like `\\Volume` seem to be erased and unavailable.

---

<div class="post-metadata">

**Author:** ![pkrishna](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pkrishna/32/1977_2.png) [@pkrishna](https://forums.creativeclouddeveloper.com/u/pkrishna)\
**Post date:** [August 9, 2023, 6:24pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/11 "2023-08-09T18:24:20Z")

</div>

@Tais993 Permissions for scripts are a little limiting [https://developer.adobe.com/photoshop/uxp/2022/scripting/how-it-works/#permitted-uxp-modules](https://developer.adobe.com/photoshop/uxp/2022/scripting/how-it-works/#permitted-uxp-modules) However, it should have worked within a plugin. Can you share the manifest.json and code snippet?

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 10, 2023, 7:13am UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/12 "2023-08-10T07:13:56Z")

</div>

When using localFileSystem.getFileForOpening it works fine, or is that bypassed as it’s user-selection?

I added this to my manifest:

```auto
"requiredPermissions": {
  "localFileSystem": "fullAccess",
  "network": {
    "domains": [
      "10.0.4.34",
      "OO-PWK-FL01",
      "OO-PWK-FL01\\Profiles$"
    ]
  }
},

```

The error was still:  
 ![image](https://us1.discourse-cdn.com/flex015/uploads/xdplugins/original/2X/f/fe365b971bdc414e8fea881930121d6065002512.png)

With the code:

```auto
const data = fs.readFileSync("\\\\OO-PWK-FL01\\Profiles$\\t.beek\\Documents\\Voorbeeld fotos\\test\\Auto Edits\\PSS-config.json", "test");

```

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 10, 2023, 8:43am UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/13 "2023-08-10T08:43:19Z")

</div>

Forgot to mention, so just to make sure: @pkrishna

---

<div class="post-metadata">

**Author:** ![pkrishna](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.creativeclouddeveloper.com/pkrishna/32/1977_2.png) [@pkrishna](https://forums.creativeclouddeveloper.com/u/pkrishna)\
**Post date:** [August 10, 2023, 6:19pm UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/14 "2023-08-10T18:19:26Z")

</div>

@Tais993 Thanks for sharing the details.  
Would like to point out that the ‘network’ permission does not influence the file system access. So you can remove OO-PWK-FL01 from network → domains.  
To what @dotproduct recommended, can you try accessing any other location, such as a desktop folder, with your plugin to test that it works under normal circumstances?  
Ideally, `"localFileSystem": "fullAccess"` should do the job but I have heard an issue with unusual drives sometimes. As an interim, my recommendation would be to move your files to a more accessible location while we look into this.

---

<div class="post-metadata">

**Author:** ![Tais993](https://avatars.discourse-cdn.com/v4/letter/t/d78d45/32.png) [@Tais993](https://forums.creativeclouddeveloper.com/u/Tais993)\
**Post date:** [August 11, 2023, 6:30am UTC](https://forums.creativeclouddeveloper.com/t/cant-access-certain-network-drive-when-using-localfilesystem-getentrywithurl/6619/15 "2023-08-11T06:30:04Z")

</div>

> To what @dotproduct recommended, can you try accessing any other location, such as a desktop folder, with your plugin to test that it works under normal circumstances?

Yes, no issues when loading files on a mounted drive in my plugin.

> As an interim, my recommendation would be to move your files to a more accessible location while we look into this.

I have written a script which moves all files to the C drive temp folder, works for now.  
Is there any way to follow bug progress? If no, that’s fine!
