« Commands
»
Script (Rhai)
▶ Run
// Read a file let content = cat("/tmp/rex/hello.txt"); info(content); // Try to write to it write("/tmp/rex/hello.txt", "Goodbye!");
Policy (Cedar)
permit( principal, action in [ file_system::Action::"open", file_system::Action::"read", // "write" is not listed — try adding it! //file_system::Action::"write", ], resource ) when { resource in file_system::Dir::"/tmp/rex" || resource == file_system::Dir::"/tmp/rex" };
Output
Files
— sandboxed
Reset