Deno.symlink requests extra full access permissions
Why are extra permissions being requested? I want to restrict the script’s access to a specific folder, not grant it permission to read and write anywhere.
link.ts
Deno.symlink('test/hi.txt', 'test/hello.txt', {type: 'file'})
DENO_TRACE_PERMISSIONS=1 deno run --allow-read=test --allow-write=test link.ts
┏
Deno requests write access.
┠─ Requested by
┃ ├─ op_fs_symlink_async (ext:core/00_infra.js:289:44)
┃ ├─ Object.symlink (ext:deno_fs/30_fs.js:531:9)
┃ └─ file:///.../link.ts:1:6
┠─ Learn more at: https://docs.deno.com/go/--allow-write
┠─ Run again with --allow-write to bypass this prompt.
Granted write access.
┏
Deno requests read access.
┠─ Requested by
┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.
┠─ Learn more at: https://docs.deno.com/go/--allow-read
┠─ Run again with --allow-read to bypass this prompt.
link.ts
Deno.symlink('test/hi.txt', 'test/hello.txt', {type: 'file'})
DENO_TRACE_PERMISSIONS=1 deno run --allow-read=test --allow-write=test link.ts
┏
┠─ Requested by
Deno.symlink() API.┃ ├─ op_fs_symlink_async (ext:core/00_infra.js:289:44)
┃ ├─ Object.symlink (ext:deno_fs/30_fs.js:531:9)
┃ └─ file:///.../link.ts:1:6
┠─ Learn more at: https://docs.deno.com/go/--allow-write
┠─ Run again with --allow-write to bypass this prompt.
┏
┠─ Requested by
Deno.symlink() API.┠─ To see a stack trace for this prompt, set the DENO_TRACE_PERMISSIONS environmental variable.
┠─ Learn more at: https://docs.deno.com/go/--allow-read
┠─ Run again with --allow-read to bypass this prompt.
Deno
A guide to Deno's security model and permissions system. Learn about secure defaults, permission flags, runtime prompts, and how to safely execute code with granular access controls.
Deno
A guide to Deno's security model and permissions system. Learn about secure defaults, permission flags, runtime prompts, and how to safely execute code with granular access controls.

Deno.* APIs