-
Notifications
You must be signed in to change notification settings - Fork 464
Closed
Labels
🚨This issue needs some love.This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.semver: patchA minor bug fix or small change.A minor bug fix or small change.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Description
Discovered in #927
public FileDataStoreFactory(File dataDirectory) throws IOException {
dataDirectory = dataDirectory.getCanonicalFile();
this.dataDirectory = dataDirectory;
// error if it is a symbolic link
if (IOUtils.isSymbolicLink(dataDirectory)) {
throw new IOException("unable to use a symbolic link: " + dataDirectory);
}
// create parent directory (if necessary)
if (!dataDirectory.exists() && !dataDirectory.mkdirs()) {
throw new IOException("unable to create directory: " + dataDirectory);
}
if (IS_WINDOWS) {
setPermissionsToOwnerOnlyWindows(dataDirectory);
} else {
setPermissionsToOwnerOnly(dataDirectory);
}
}
setPermissionsToOwnerOnlyWindows and setPermissionsToOwnerOnly have several possible failure modes (i.e. exceptions thrown). Some of these are bubbled and some of these are eaten.
We need a consistent decision on whether failing to set permissions to owner only is or is not a fatal error. Whichever we decide we need to change the code to implement that on all paths.
Metadata
Metadata
Assignees
Labels
🚨This issue needs some love.This issue needs some love.priority: p1Important issue which blocks shipping the next release. Will be fixed prior to next release.Important issue which blocks shipping the next release. Will be fixed prior to next release.semver: patchA minor bug fix or small change.A minor bug fix or small change.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.