# File system persimmon access with event.file.copyTo() on upload components

**URL:** <https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876>\
**Category:** Ignition\
**Tags:** perspective\
**Created:** [January 21, 2023, 4:26pm UTC](https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876 "2023-01-21T16:26:27Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [January 21, 2023, 4:26pm UTC](https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876/1 "2023-01-21T16:26:27Z")

</div>

Hello,

I try to use event.file.copyTo("d:/alarms") in onFileReceived on upload components in Perspective Event but get the following error:

> com.inductiveautomation.ignition.common.script.JythonExecException  
> Traceback (most recent call last):  
> File "function:runAction", line 2, in runAction  
> java.io.FileNotFoundException: java.io.FileNotFoundException: D:\Alarms (Access is denied)
> 
> caused by org.python.core.PyException  
> Traceback (most recent call last):  
> File "function:runAction", line 2, in runAction  
> java.io.FileNotFoundException: java.io.FileNotFoundException: D:\Alarms (Access is denied)
> 
> caused by FileNotFoundException: D:\Alarms (Access is denied)
> 
> Ignition v8.1.12 (b2021111810)  
> Java: Azul Systems, Inc. 11.0.11

I try to change security to the D drive and alarms folder but it doesn't work.  
Thanks for any help.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 21, 2023, 4:44pm UTC](https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876/2 "2023-01-21T16:44:25Z")

</div>

What do you mean you tried to change security? From what to what? (The security needed is the permissions for the user account running the gateway services. Which is a local system account by default, not a regular user.)

---

<div class="post-metadata">

**Author:** ![nader.chinichian](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/nader.chinichian/32/9261_2.png) [@nader.chinichian](https://forum.inductiveautomation.com/u/nader.chinichian)\
**Post date:** [January 21, 2023, 5:09pm UTC](https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876/3 "2023-01-21T17:09:16Z")

</div>

In windows I change the permission to full control.

---

<div class="post-metadata">

**Author:** ![pturmel](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/pturmel/32/3295_2.png) [@pturmel](https://forum.inductiveautomation.com/u/pturmel)\
**Post date:** [January 21, 2023, 5:14pm UTC](https://forum.inductiveautomation.com/t/file-system-persimmon-access-with-event-file-copyto-on-upload-components/68876/4 "2023-01-21T17:14:40Z")

</div>

Hmmm. Your `.copyTo()` as shown is just a folder name. You need to supply a complete file name. One of your own posts is an example:

> [@Disable perspective image component cache](https://forum.inductiveautomation.com/t/disable-perspective-image-component-cache/55987/3):
>
> Thanks, Paul, I just face another problem, when I upload a file in the gateway file system the next time I want to upload and overwrite the file I get this error which file is open and used by java.exe. \> java.io.FileNotFoundException: java.io.FileNotFoundException: webserver\webapps\main\User Image\nader.png (The requested operation cannot be performed on a file with a user-mapped section open) I simply want to save user profile pictures and user can change their user profile picture. base…
