Skip to content

Per‐user file sandbox

David Anderson edited this page Jun 27, 2024 · 1 revision

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, we allow users to 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 from PC to sandbox
  • view the files in their sandbox, including size and MD5.
  • download files from sandbox to PC
  • delete files from the sandbox

Files in the sandbox can be modified, and all old versions are retained on the server. When a batch of jobs is submitted, it uses the input file versions at the moment of submission, even if the files are then modified while the batch is in progress.

Files in the sandbox are not cleanup up automatically. The web interface allows users to delete their files.

Implementation

Links to the files are stored in a "sandbox directory" PROJECT_ROOT/sandbox/USERID/. The entries in this directory have contents

size MD5

The actual files are stored in the download directory, under the name sb_userid_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