{"record":{"id":"be31cf2f212e562b","repo":"pentaho/pentaho-kettle","slug":"modify-transformation-repository-is-read-only","errorCode":null,"errorMessage":"MODIFY_TRANSFORMATION : repository is read-only","messagePattern":"MODIFY_TRANSFORMATION : repository is read-only","errorType":"exception","errorClass":"KettleException","httpStatus":null,"severity":"error","filePath":"engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepositorySecurityProvider.java","lineNumber":53,"sourceCode":"  }\n\n  public UserInfo getUserInfo() {\n    return null;\n  }\n\n  public RepositoryMeta getRepositoryMeta() {\n    return repositoryMeta;\n  }\n\n  public void validateAction( RepositoryOperation... operations ) throws KettleException, KettleSecurityException {\n\n    for ( RepositoryOperation operation : operations ) {\n      switch ( operation ) {\n        case READ_TRANSFORMATION:\n          break;\n        case MODIFY_TRANSFORMATION:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n        case DELETE_TRANSFORMATION:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }\n          break;\n        case EXECUTE_TRANSFORMATION:\n          break;\n        case LOCK_TRANSFORMATION:\n          break;\n\n        case READ_JOB:\n          break;\n        case MODIFY_JOB:\n          if ( capabilities.isReadOnly() ) {\n            throw new KettleException( operation + \" : repository is read-only\" );\n          }","sourceCodeStart":35,"sourceCodeEnd":71,"githubUrl":"https://github.com/pentaho/pentaho-kettle/blob/f3058517a153da500bf4551f46d79b91bf8ec552/engine/src/main/java/org/pentaho/di/repository/filerep/KettleFileRepositorySecurityProvider.java#L35-L71","documentation":"KettleFileRepositorySecurityProvider.validateAction() throws this KettleException when a MODIFY_TRANSFORMATION operation is requested but the repository capabilities say it is read-only. The file repository has no fine-grained security model; it only enforces the read-only flag.","triggerScenarios":"Any save/update of a transformation (saveTransformation, etc.) through a KettleFileRepository whose RepositoryCapabilities.isReadOnly() is true - typically a repository meta opened with read_only=Y.","commonSituations":"Repository connection configured with read-only flag (or hides read-only default in Spoon); writing to a repository loaded programmatically with a read-only KettleFileRepositoryMeta.","solutions":["Reconnect to the repository with the read-only option disabled","Set readOnly=false (remove read_only=Y) on the KettleFileRepositoryMeta before connecting","Check capabilities via repo.getRepositoryCapabilities().isReadOnly() before attempting saves","If read-only is intentional, route writes to a writable repository"],"exampleFix":"// before\nKettleFileRepositoryMeta meta = new KettleFileRepositoryMeta();\nmeta.setReadOnly(true); // any save will fail\n// after\nmeta.setReadOnly(false); // or verify before saving\nif (!repo.getRepositoryCapabilities().isReadOnly()) {\n  repo.save(transMeta, \"comment\", null);\n}","handlingStrategy":"validation","validationCode":"if (repo.getRepositoryCapabilities().isReadOnly()) {\n  throw new IllegalStateException(\"Repository is read-only; cannot modify transformations\");\n}","typeGuard":null,"tryCatchPattern":"try {\n  repo.save(transMeta, \"comment\", null);\n} catch (KettleException e) {\n  if (e.getMessage().contains(\"read-only\")) {\n    log.error(\"Reconnect with a writable repository\");\n  }\n}","preventionTips":["Check capabilities.isReadOnly() before any write operation","Keep separate read-only and writable connection profiles","Verify the read_only flag in repository metadata when connecting"],"tags":["repository","read-only","security","permissions"],"backgroundTag":"permission-denied","analyzedSha":"f3058517a153da500bf4551f46d79b91bf8ec552","analyzedAt":"2026-09-13T14:04:16.340Z","contentChangedAt":"2026-09-13T14:04:16.340Z","schemaVersion":2},"datasetVersion":"2026-09-20T23:17:15.980Z"}