{"record":{"id":"378583d94b0d546f","repo":"octobercms/october","slug":"error-saving-file-name-please-check-write-perm","errorCode":null,"errorMessage":"Error saving file ':name'. Please check write permissions.","messagePattern":"Error saving file ':name'\\. Please check write permissions\\.","errorType":"exception","errorClass":"ApplicationException","httpStatus":null,"severity":"error","filePath":"modules/cms/classes/Asset.php","lineNumber":336,"sourceCode":"                    ['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;\n        if (@File::put($fullPath, $this->content) === false) {\n            throw new ApplicationException(Lang::get(\n                'cms::lang.cms_object.error_saving',\n                ['name'=>$this->fileName]\n            ));\n        }\n\n        if (strlen($this->originalFileName) && $this->originalFileName !== $this->fileName) {\n            $fullPath = $this->getFilePath($this->originalFileName);\n\n            if (File::isFile($fullPath)) {\n                @unlink($fullPath);\n            }\n        }\n\n        clearstatcache();\n\n        $this->mtime = @File::lastModified($newFullPath);\n        $this->originalFileName = $this->fileName;\n        $this->exists = true;","sourceCodeStart":318,"sourceCodeEnd":354,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/cms/classes/Asset.php#L318-L354","documentation":"Error \"Error saving file ':name'. Please check write permissions.\" thrown in octobercms/october.","triggerScenarios":"Thrown at modules/cms/classes/Asset.php:336 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"}