{"record":{"id":"f4503641f9c497f8","repo":"octobercms/october","slug":"error-creating-directory-name-please-check-write","errorCode":null,"errorMessage":"Error creating directory :name. Please check write permissions.","messagePattern":"Error creating directory :name\\. Please check write permissions\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/Asset.php","lineNumber":316,"sourceCode":"     * save the object to the disk\n     */\n    public function save()\n    {\n        $this->validateFileName();\n\n        $fullPath = $this->getFilePath();\n\n        if (File::isFile($fullPath) && $this->originalFileName !== $this->fileName) {\n            throw new ApplicationException(Lang::get(\n                'cms::lang.cms_object.file_already_exists',\n                ['name'=>$this->fileName]\n            ));\n        }\n\n        $dirPath = $this->theme->getPath().'/'.$this->dirName;\n        if (!file_exists($dirPath) || !is_dir($dirPath)) {\n            if (!File::makeDirectory($dirPath, 0755, true, true)) {\n                throw new ApplicationException(Lang::get(\n                    'cms::lang.cms_object.error_creating_directory',\n                    ['name'=>$dirPath]\n                ));\n            }\n        }\n\n        if (($pos = strpos($this->fileName, '/')) !== false) {\n            $dirPath = dirname($fullPath);\n\n            if (!is_dir($dirPath) && !File::makeDirectory($dirPath, 0755, true, true)) {\n                throw new ApplicationException(Lang::get(\n                    'cms::lang.cms_object.error_creating_directory',\n                    ['name'=>$dirPath]\n                ));\n            }\n        }\n\n        $newFullPath = $fullPath;","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/Asset.php#L298-L334","documentation":"Error \"Error creating directory :name. Please check write permissions.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/classes/Asset.php:316 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":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-08-21T11:28:35.574Z"}