Exporting UDT on Linux Error

I'm trying to export a udt on a Linux system and keeps flagging that it cannot create the file, although the file already exists.

Here's the script I'm using:

Use double forward slashes for the root on Linux

filePath = "/home/user/udts/test.json"
tagPaths = ["[default]_types_/PlantInfo/Plant_Info"]

system.tag.exportTags(
filePath = filePath,
tagPaths = tagPaths
)

And the error I'm getting:

java.io.IOException: java.io.IOException: Cannot create directory '\home\user\udts'

Thank you in advance.

Where are you running this code? Which system is the Linux system, yours or the one running the Gateway?