Skip to content

User file sandbox

David Anderson edited this page Mar 9, 2026 · 2 revisions

When using web-based job submission, input files can be large, and it would be inconvenient to upload these files each time jobs are submitted. Instead, users can maintain a set of files on the project server; this is called the user's "file sandbox".

Using a web interface (sandbox.php), users can

  • upload files to their sandbox
  • view the files in their sandbox, including size and MD5.
  • download files from the sandbox
  • delete files from the sandbox

Unlike most files in BOINC, sandbox files are not immutable. You can delete a file, then upload a different file with the same name.

Using sandbox files in job submission

Web-based job submission systems written in PHP can use a set of utility functions in html/inc/sandbox.inc to enumerate sandbox files, get their paths, and stage them.

When copying a sandbox file, these systems should rename them with a descriptive and unique names (e.g. include the file's MD5 in the name).

Implementation

The files are stored in a "sandbox directory"

<project>/sandbox/<user-id>/

When a file is uploaded, its MD5 and size are computed and store in a same-named file in

<project>/sandbox/<user-id>/.md5/

Note: files are uploaded via a PHP script. PHP's default max file upload size is 2MB. To increase this, edit /etc/php.ini, and change, e.g.

upload_max_filesize = 64M
post_max_size = 64M

Clone this wiki locally