{"record":{"id":"78f82445de6a89ce","repo":"phacility/phabricator","slug":"malformed-local-disk-storage-root-you-must-provid","errorCode":null,"errorMessage":"Malformed local disk storage root. You must provide an absolute path, and can not use '%s' as the root.","messagePattern":"Malformed local disk storage root\\. You must provide an absolute path, and can not use '(.+?)' as the root\\.","errorType":"exception","errorClass":"PhabricatorFileStorageConfigurationException","httpStatus":null,"severity":"error","filePath":"src/applications/files/engine/PhabricatorLocalDiskFileStorageEngine.php","lineNumber":105,"sourceCode":"      Filesystem::remove($path);\n    }\n  }\n\n\n/* -(  Internals  )---------------------------------------------------------- */\n\n\n  /**\n   * Get the configured local disk path for file storage.\n   *\n   * @return string Absolute path to somewhere that files can be stored.\n   * @task internal\n   */\n  private function getLocalDiskFileStorageRoot() {\n    $root = PhabricatorEnv::getEnvConfig('storage.local-disk.path');\n\n    if (!$root || $root == '/' || $root[0] != '/') {\n      throw new PhabricatorFileStorageConfigurationException(\n        pht(\n          \"Malformed local disk storage root. You must provide an absolute \".\n          \"path, and can not use '%s' as the root.\",\n          '/'));\n    }\n\n    return rtrim($root, '/');\n  }\n\n\n  /**\n   * Convert a handle into an absolute local disk path.\n   *\n   * @param string File data handle.\n   * @return string Absolute path to the corresponding file.\n   * @task internal\n   */\n  private function getLocalDiskFileStorageFullPath($handle) {","sourceCodeStart":87,"sourceCodeEnd":123,"githubUrl":"https://github.com/phacility/phabricator/blob/5720a38cfe95b00ca4be5016dd0d2f3195f4fa04/src/applications/files/engine/PhabricatorLocalDiskFileStorageEngine.php#L87-L123","documentation":"PhabricatorLocalDiskFileStorageEngine requires the storage.local-disk.path configuration to be a non-empty absolute path other than '/'. getLocalDiskFileStorageRoot() throws PhabricatorFileStorageConfigurationException when the config is missing, is literally '/', or does not start with '/' (a relative path). This is a setup/configuration failure raised the moment the local-disk engine tries to resolve a storage path.","triggerScenarios":"Selecting the local-disk storage engine while storage.local-disk.path is unset; setting it to a relative value like 'files/' or './data'; setting it to '/' as the root.","commonSituations":"Fresh installs copying trimmed example config; containerized deployments assuming a relative working directory; config applied in the wrong environment or overridden later with an empty value.","solutions":["Set an absolute path: ./bin/config set storage.local-disk.path /var/phabricator/files (or edit the config JSON directly)","Create the directory and make it writable by the web server and daemon users (mkdir -p /var/phabricator/files && chown www-data:www-data /var/phabricator/files)","Never use '/' or a relative path as the storage root"],"exampleFix":"// before (local.json)\n\"storage.local-disk.path\": \"files/data\"\n\n// after\n\"storage.local-disk.path\": \"/var/phabricator/files\"","handlingStrategy":"validation","validationCode":"$root = PhabricatorEnv::getEnvConfig('storage.local-disk.path');\nif (!$root || $root === '/' || $root[0] !== '/') {\n  // fail setup loudly before selecting the local-disk engine\n}","typeGuard":null,"tryCatchPattern":"catch PhabricatorFileStorageConfigurationException at storage-engine selection and render a setup/diagnostic error page instead of a runtime 500.","preventionTips":["Validate storage paths in deployment config before switching engines","Use absolute paths on mounted volumes in containerized setups","Confirm the directory exists and is writable by the web/daemon users before first upload"],"tags":["configuration","storage","local-disk","path-validation"],"backgroundTag":"invalid-storage-config","analyzedSha":"5720a38cfe95b00ca4be5016dd0d2f3195f4fa04","analyzedAt":"2026-08-21T05:07:25.672Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}