Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Acccess file system outside sandbox with node.js

Not applicable
in a previous question i found out where in the on prem file system a node.js app lived - but now i am trying to figure out if I can get r/w access outside of the immediate file system sandbox. For instance:
/opt/apigee4/var/log/apigee/message-processor/work/o/{org}/e/{environment}/a/{proxyname}_<ver>/node/organization/environment/api
Is where my code lives. Lets say I wanted to write something out to disk.. this is where it would show up. If i were to run a node module called "whereami.js" which output the full path it would output the following:
/organization/environment/api/whereami.js 
which seemingly identifies the bounds of the file systems andbox. But what if I wanted to write into /opt/otherfilelocation/ instead? Is this something that is possible?
Solved Solved
0 5 1,084
1 ACCEPTED SOLUTION

Not applicable

Node.js support in Edge was designed os that this sandbox is in place, so there is no way to read or write outside that virtual file system from inside the Node.js app. But if you're running Edge on-premises (not in our cloud) we'd have to enhance the product to allow you to enable the ability read and write to the "real" filesystem instead.

What's your use case for doing that?

View solution in original post

5 REPLIES 5