{"record":{"id":"e6da6b380ba75cd3","repo":"sqlmapproject/sqlmap","slug":"unable-to-write-to-the-temporary-directory-s","errorCode":null,"errorMessage":"unable to write to the temporary directory ('%s'). Please make sure that your disk is not full and that you have sufficient write permissions to create temporary files and/or directories","messagePattern":"unable to write to the temporary directory \\('(.+?)'\\)\\. Please make sure that your disk is not full and that you have sufficient write permissions to create temporary files and/or directories","errorType":"exception","errorClass":"SqlmapSystemException","httpStatus":null,"severity":"error","filePath":"lib/core/target.py","lineNumber":654,"sourceCode":"        conf.resultsFile = conf.resultsFile or os.path.join(paths.SQLMAP_OUTPUT_PATH, time.strftime(RESULTS_FILE_FORMAT).lower())\n        found = os.path.exists(conf.resultsFile)\n\n        try:\n            conf.resultsFP = openFile(conf.resultsFile, \"a\", UNICODE_ENCODING, buffering=0)\n        except (OSError, IOError) as ex:\n            try:\n                warnMsg = \"unable to create results file '%s' ('%s'). \" % (conf.resultsFile, getUnicode(ex))\n                handle, conf.resultsFile = tempfile.mkstemp(prefix=MKSTEMP_PREFIX.RESULTS, suffix=\".csv\")\n                os.close(handle)\n                conf.resultsFP = openFile(conf.resultsFile, \"w+\", UNICODE_ENCODING, buffering=0)\n                warnMsg += \"Using temporary file '%s' instead\" % conf.resultsFile\n                logger.warning(warnMsg)\n            except IOError as _:\n                errMsg = \"unable to write to the temporary directory ('%s'). \" % _\n                errMsg += \"Please make sure that your disk is not full and \"\n                errMsg += \"that you have sufficient write permissions to \"\n                errMsg += \"create temporary files and/or directories\"\n                raise SqlmapSystemException(errMsg)\n\n        if not found:\n            conf.resultsFP.writelines(\"Target URL,Place,Parameter,Technique(s),Note(s)%s\" % os.linesep)\n\n        logger.info(\"using '%s' as the CSV results file in multiple targets mode\" % conf.resultsFile)\n\ndef _createFilesDir():\n    \"\"\"\n    Create the file directory.\n    \"\"\"\n\n    if not any((conf.fileRead, conf.commonFiles, conf.xxe)):\n        return\n\n    # Note: normalize the hostname consistently with conf.outputPath / conf.dumpPath (see _createDumpDir)\n    conf.filePath = paths.SQLMAP_FILES_PATH % normalizeUnicode(getUnicode(conf.hostname))\n\n    if not os.path.isdir(conf.filePath):","sourceCodeStart":636,"sourceCodeEnd":672,"githubUrl":"https://github.com/sqlmapproject/sqlmap/blob/0a35b20e3953d341be6c7ac75ccb0b3362540c8d/lib/core/target.py#L636-L672","documentation":"Error \"unable to write to the temporary directory ('%s'). Please make sure that your disk is not full and that you have sufficient write permissions to create temporary files and/or directories\" thrown in sqlmapproject/sqlmap.","triggerScenarios":"Thrown at lib/core/target.py:654 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"0a35b20e3953d341be6c7ac75ccb0b3362540c8d","analyzedAt":"2026-08-26T23:02:52.002Z","schemaVersion":2},"datasetVersion":"2026-08-27T03:17:27.898Z"}