Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions content/platform/guides/sandboxes.md
Original file line number Diff line number Diff line change
Expand Up @@ -584,6 +584,17 @@ run as the session user, so a write into a directory that user cannot write retu
`409` with code `sandbox_path_conflict`. Files survive suspend/resume and are removed with
the session.

A read of a path with no file returns `404` with code `sandbox_file_not_found`.
A directory, symbolic link, socket, or other special file at the path returns
`400` with code `sandbox_file_unreadable`, as does a file the session user can't
read and, in a cloud session, a file another user owns or one with more than one
hard link. Copy such a file to a new one with an exec command, then read the

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚪ P3: "Copy such a file with an exec command" can't work for an unreadable file, a directory, or a socket

The paragraph lists several cases: directories, symbolic links, sockets and other special files, a file the session user can't read, and (in a cloud session) a file another user owns or one with more than one hard link. It then says "Copy such a file to a new one with an exec command, then read the copy." Line 580 says exec commands run as the session user. So cp fails with permission denied on a file that user can't read, and copying a directory or socket doesn't produce a regular file to read. The advice only works for the readable cases: a file another user owns, a file with more than one hard link, and a symlink to a regular file. Fix: say which cases the copy advice is for, for example "Copy a file another user owns or one with more than one hard link…". For a file the session user owns with its read bit clear, suggest chmod u+r.

Found by claude-opus-5-5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟡 P2: Scope the copy workaround to files the session user can read

The preceding list includes files the session user cannot read, but exec commands run as that same user, so copying those files also fails with a permission error. Copying a directory or socket likewise does not produce readable regular-file content. Restrict this workaround to readable file content and provide separate guidance for permission failures and non-file paths.

Found by gpt-6.1-sol

copy. A file larger than 8 MiB
returns `413` with code `sandbox_file_too_large`. A session from an image built
before these codes, such as a custom template not redeployed since, returns
`503` instead; start a new session from a current preset, or redeploy the
template.

### Upload a directory as a tar archive

Create a file archive to write a whole tree in one request. Send
Expand Down