{"record":{"id":"de4c1e31f8063331","repo":"prestodb/presto","slug":"file-does-not-exist-de4c1e","errorCode":null,"errorMessage":"File  does not exist","messagePattern":"File  does not exist","errorType":"validation","errorClass":"FileNotFoundException","httpStatus":null,"severity":"error","filePath":"presto-password-authenticators/src/main/java/com/facebook/presto/password/file/FileAuthenticator.java","lineNumber":42,"sourceCode":"import java.security.Principal;\nimport java.util.function.Supplier;\n\nimport static com.google.common.base.Suppliers.memoizeWithExpiration;\nimport static java.util.concurrent.TimeUnit.MILLISECONDS;\n\npublic class FileAuthenticator\n        implements PasswordAuthenticator\n{\n    private static final Logger log = Logger.get(FileAuthenticator.class);\n    private final Supplier<PasswordStore> passwordStoreSupplier;\n\n    @Inject\n    public FileAuthenticator(FileConfig config) throws FileNotFoundException\n    {\n        File file = config.getPasswordFile();\n        if (!file.exists()) {\n            log.error(\"File %s does not exist\", file.getAbsolutePath());\n            throw new FileNotFoundException(\"File \" + file.getAbsolutePath() + \" does not exist\");\n        }\n        int cacheMaxSize = config.getAuthTokenCacheMaxSize();\n\n        passwordStoreSupplier = memoizeWithExpiration(\n                () -> new PasswordStore(file, cacheMaxSize),\n                config.getRefreshPeriod().toMillis(),\n                MILLISECONDS);\n    }\n\n    @Override\n    public Principal createAuthenticatedPrincipal(String user, String password)\n    {\n        if (!passwordStoreSupplier.get().authenticate(user, password)) {\n            throw new AccessDeniedException(\"Invalid credentials\");\n        }\n\n        return new BasicPrincipal(user);\n    }","sourceCodeStart":24,"sourceCodeEnd":60,"githubUrl":"https://github.com/prestodb/presto/blob/55bb57d202de3b926896fa966c2c4a44c779634e/presto-password-authenticators/src/main/java/com/facebook/presto/password/file/FileAuthenticator.java#L24-L60","documentation":"Startup validation in the FileAuthenticator constructor: the configured password file (password.file / password-authenticator-file) does not exist on disk, so the file-based authenticator cannot be initialized and a FileNotFoundException is thrown at plugin setup time.","triggerScenarios":"Thrown at presto-password-authenticators/src/main/java/com/facebook/presto/password/file/FileAuthenticator.java:42 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Create the password file at the configured path or fix the path in the configuration","Ensure the coordinator process has read permission on the file","Verify the config property points to the correct absolute path"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"55bb57d202de3b926896fa966c2c4a44c779634e","analyzedAt":"2026-09-04T12:50:26.162Z","contentChangedAt":"2026-09-04T12:50:26.162Z","schemaVersion":2},"datasetVersion":"2026-09-11T21:17:09.523Z"}