if (file.canWrite()) {
if (this.lager.accounting) {
logger.debug("can write to " + file.getAbsolutePath());
}
} else {
throw new WorkspaceException("can not write to " +
name + ": '" + file.getAbsolutePath() + "'");
}
if (setFilePermissions(file.getAbsolutePath(), 600)) {
if (this.lager.accounting) {
logger.debug("able to set owner only: " +
file.getAbsolutePath());
}
} else {
throw new WorkspaceException("can not set " +
name + " permissions to owner-only: '" +
file.getAbsolutePath() + "'");
}
} catch (IOException e) {
throw new WorkspaceException(name + " ('" +
file.getAbsolutePath() + "') is not set up properly:", e);
}
}