{"record":{"id":"d5c170cd8f8eee7f","repo":"phacility/phabricator","slug":"unable-to-upload-file-this-server-is-not-configur","errorCode":null,"errorMessage":"Unable to upload file: this server is not configured with any storage engine which can store large files.","messagePattern":"Unable to upload file: this server is not configured with any storage engine which can store large files\\.","errorType":"exception","errorClass":"Exception","httpStatus":null,"severity":"error","filePath":"src/applications/files/uploadsource/PhabricatorFileUploadSource.php","lineNumber":284,"sourceCode":"    }\n\n    $mime_type = $this->getMimeType();\n    if ($mime_type !== null) {\n      $parameters['mime-type'] = $mime_type;\n    }\n\n    $author_phid = $this->getAuthorPHID();\n    if ($author_phid !== null) {\n      $parameters['authorPHID'] = $author_phid;\n    }\n\n    return $parameters;\n  }\n\n  private function getChunkEngine() {\n    $chunk_engines = PhabricatorFileStorageEngine::loadWritableChunkEngines();\n    if (!$chunk_engines) {\n      throw new Exception(\n        pht(\n          'Unable to upload file: this server is not configured with any '.\n          'storage engine which can store large files.'));\n    }\n\n    return head($chunk_engines);\n  }\n\n  private function setTotalBytesWritten($total_bytes_written) {\n    $this->totalBytesWritten = $total_bytes_written;\n    return $this;\n  }\n\n  private function getTotalBytesWritten() {\n    return $this->totalBytesWritten;\n  }\n\n}","sourceCodeStart":266,"sourceCodeEnd":302,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/uploadsource/PhabricatorFileUploadSource.php#L266-L302","documentation":"PhabricatorFileUploadSource::getChunkEngine() calls PhabricatorFileStorageEngine::loadWritableChunkEngines(); an empty result means no storage engine that supports chunked storage is both configured and writable on this server. Chunking is required for uploads above the engine threshold, so large uploads are impossible until at least one chunk-capable engine (local disk, S3, MySQL blob engine as configured) is available.","triggerScenarios":"Uploading a file large enough to trigger chunked upload (bigger than the single-write threshold) on an instance with no storage engine configured, or one whose engine fails its writability check — e.g. storage.local-disk.path never set, points at a missing directory, or the directory is not writable by the web/daemon user.","commonSituations":"Fresh Phabricator installs where no storage.local-disk.path (or S3 config) was provided; ops moving storage directories without updating permissions; S3 credentials/bucket misconfigured so the engine reports not writable.","solutions":["Configure a storage engine, simplest is local disk: ./bin/config set storage.local-disk.path /var/phabricator/files (create the directory first).","Ensure the PHP/daemon user can write there: mkdir -p /var/phabricator/files && chown www-data /var/phabricator/files (or grant group write).","Re-test with a large upload; if using S3/other engines, verify their config keys and credentials so the engine passes the writable check."],"exampleFix":"# before: no chunk engine configured, large upload fails\nsudo mkdir -p /var/phabricator/files\nsudo chown www-data:www-data /var/phabricator/files\n./bin/config set storage.local-disk.path /var/phabricator/files\n# after: retry the large upload","handlingStrategy":"validation","validationCode":"if (!PhabricatorFileStorageEngine::loadWritableChunkEngines()) {\n  // large uploads will fail; require configuration first\n  throw new Exception('Configure a writable storage engine before accepting large uploads.');\n}","typeGuard":null,"tryCatchPattern":"try {\n  $file = $source->uploadFile();\n} catch (Exception $ex) {\n  if (preg_match('/storage engine which can store large files/', $ex->getMessage())) {\n    // surface a setup/ops error, not a client error\n    throw new AphrontRecoverableException('File storage is not configured.');\n  }\n  throw $ex;\n}","preventionTips":["As part of install, set storage.local-disk.path (or S3 config) and create the directory with correct ownership.","Include a chunk-engine check in health/monitoring so drift is detected before users hit it.","Re-verify storage configuration and directory permissions after storage migrations or server moves."],"tags":["phabricator","file-storage","chunked-upload","configuration","php"],"backgroundTag":"no-storage-backend-configured","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}