Trying to save files/reports in a folder on a shared network drive

I am trying to save reports/files on a shared network drive. I’ve tried changing the file path to the ip address and just the G:, but i’ve had limited success. When I use the ip address directly, I don’t seem to get any errors in the logs or in the gateway, but I do not see the file present in the shared drive. Does this mean that I need some sort of authentication? access to the drive requires this but I don’t see any viable methods in ignition, and is there another way to do this?

The user the Ignition service runs under needs to have permission to write to the location.

I believe the user that the Ignition service runs under has permission to write to the location currently. I’m able to make folders and new files in that location via normal means, but when I attempt to do so on Ignition, I can’t seen to do so.

I should clarify: if this is a client script, the user the client runs under needs permissions while if it is a gateway script, the user the gateway runs under needs permissions. The following code works in our case:

filePath = '//192.168.196.230/d/data/backup.csv'
system.file.writeFile(filePath, csv)

I can’t check on the target of this write command at the moment, but I believe I gave “Everyone” full permission on this share. This was acceptable in this particular use case, while you probably won’t want to do that. But if you can make it work that way, it narrows the problem down to a permissions issue.

The documented way to map drive letters via the service wrapper (ignition.conf) allows different user credentials per mapped drive letter, allowing the service itself to run as the Local System Account.