Skip to content

fix(fs): allow open, seek and fstat in the write permission sets - #3630

Merged
lucasfernog merged 3 commits into
tauri-apps:v2from
lucasfernog:fix/fs-write-sets-open
Oct 10, 2026
Merged

lucasfernog merged 3 commits into
tauri-apps:v2from
lucasfernog:fix/fs-write-sets-open

Conversation

@lucasfernog

Copy link
Copy Markdown
Member

The stream path of writeFile calls open, which only the nested command list of allow-write-file granted (plugins/fs/permissions/write-all.toml, write-files.toml), so fs:allow-appdata-write-recursive and the other write sets rejected streamed writes; seek/fstat were missing for FileHandles created under these sets.

Adds open, seek and fstat to write-all and write-files. This widens the write sets slightly (open is already implied by allow-write-file); the generated reference does not list set members, so nothing to regenerate.

The stream path of writeFile calls `open`, which only the nested command
list of `allow-write-file` granted (plugins/fs/permissions/write-all.toml,
write-files.toml), so `fs:allow-appdata-write-recursive` and the other
write sets rejected streamed writes; seek/fstat were missing for
FileHandles created under these sets.

Adds open, seek and fstat to write-all and write-files. This widens the
write sets slightly (open is already implied by allow-write-file); the
generated reference does not list set members, so nothing to regenerate.
@lucasfernog
lucasfernog requested a review from a team as a code owner September 23, 2026 15:17
@lucasfernog
lucasfernog force-pushed the fix/fs-write-sets-open branch from 25557cf to 5e06708 Compare September 23, 2026 15:37
@github-actions

github-actions Bot commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Package Changes Through a279600

There are 3 changes which include fs with patch, fs-js with patch, single-instance with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
api-example 2.0.55 2.0.56
api-example-js 2.0.51 2.0.52
fs 2.7.0 2.7.1
fs-js 2.7.0 2.7.1
dialog 2.8.2 2.8.3
dialog-js 2.8.2 2.8.3
http 2.8.2 2.8.3
http-js 2.8.2 2.8.3
persisted-scope 2.4.1 2.4.2
single-instance 2.5.3 2.5.4

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

Comment thread plugins/fs/permissions/write-all.toml Outdated
Comment on lines +17 to +20
# used by `writeFile` with a stream and by the `FileHandle` returned by `create` and `open`
"open",
"seek",
"fstat",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be better to introduce permission dependencies? when a plugin defines its commands

[
  ("writeFile", ["open", "seek", "fstat"]),
  ("readFile"), []),
]

@lucasfernog
lucasfernog merged commit 6a263be into tauri-apps:v2 Oct 10, 2026
23 checks passed
@lucasfernog
lucasfernog deleted the fix/fs-write-sets-open branch October 10, 2026 19:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants