FileSystemAccess: add "write" access mode
- Category
- File APIs
- Type
- New or changed feature
- Status
- Proposed (Chrome Proposed)
- Intent stage
- None
Summary
The File System Access API defines two access modes for file system entries: "read" and "readwrite". These modes are used when querying or requesting permission to an entry. An issue with the current model is that operations requiring only file system modification, such as FileSystemHandle.remove(), are forced to request broad "readwrite" permission. This behavior poses some unnecessary security risks. To address this, we propose a more granular, "write" permission mode. This new mode will allow applications to request only the permission to write to a file or directory, without also gaining permission to read from it.
Motivation
The File System Access API defines two access modes for file system entries: "read" and "readwrite". These modes are used when querying or requesting permission to an entry. An issue with the current model is that operations requiring only file system modification, such as FileSystemHandle.remove(), are forced to request broad "readwrite" permission. This behavior poses some unnecessary security risks.
Standards & signals
- Specification: https://github.com/WICG/file-system-access/pull/464
- Firefox: No signal
- Safari: No signal
- Web developers: No signals
- Tracking bug: https://crbug.com/40276567
Ecosystem
- Web Platform Tests: https://wpt.fyi/results/?q=filesystemaccess-add-write-access-mode
- Chrome Platform Showcase: https://chrome-platform-showcase.paulkinlan-ea.deno.net/features
- GenDN reference: https://gendn.paulkinlan-ea.deno.net/features
- chrome.dev demos search: https://www.google.com/search?q=site%3Achrome.dev+FileSystemAccess%3A%20add%20%22write%22%20access%20mode
- MDN Web Docs: https://developer.mozilla.org/en-US/search?q=FileSystemAccess%3A%20add%20%22write%22%20access%20mode
- Baseline status: https://webstatus.dev/?q=FileSystemAccess%3A%20add%20%22write%22%20access%20mode
Explainers: https://github.com/WICG/file-system-access/pull/462/files