Changes
diff --git a/README.md b/README.md
index 03fdfe6..1cf26bf 100644
--- a/README.md
+++ b/README.md
@@ -63,7 +63,7 @@ base URL in the application configuration and configure the proxy to accept
the intended hostname. The server uses the peer address of each connection;
behind a reverse proxy, per-client limits are therefore shared by clients
connecting through that proxy. The database directory must be persistent,
-local (not a network filesystem), and writable only by the service account.
+local (not a network filesystem), and writable by the service account.
The game data root can be temporary storage.
Example application command (replace the paths and hostname and choose limits
diff --git a/designs/design-1-multigame.md b/designs/design-1-multigame.md
index 7a716c4..a7e32f9 100644
--- a/designs/design-1-multigame.md
+++ b/designs/design-1-multigame.md
@@ -267,7 +267,7 @@ game directories may live in tmpfs and are deleted after completion.
If the database lives in `/tmp`, a host restart may erase the records,
which would defeat their purpose. Configure a separate `--database` path
and `--data-root` path. The database path and its parent directory must be
-writable only by the service account.
+writable by the service account.
Use libmw's SQLite wrapper through a narrow game-record store class. Enable
`LIBMW_BUILD_SQLITE` in CMake and link `mw::sqlite`. Open the database with
diff --git a/src/game_record_store.cpp b/src/game_record_store.cpp
index 9d99046..83b852d 100644
--- a/src/game_record_store.cpp
+++ b/src/game_record_store.cpp
@@ -85,13 +85,10 @@ std::filesystem::path prepareDatabaseDirectory(
throw std::runtime_error(
"database parent must be a real directory");
}
- constexpr auto SHARED_ACCESS = std::filesystem::perms::group_all
- | std::filesystem::perms::others_all;
- if((status.permissions() & SHARED_ACCESS) != std::filesystem::perms::none
- || ::access(parent.c_str(), W_OK | X_OK) != 0)
+ if(::access(parent.c_str(), W_OK | X_OK) != 0)
{
throw std::runtime_error(
- "database parent must be writable and accessible only to its owner");
+ "database parent must be writable and searchable");
}
const bool database_exists = std::filesystem::exists(absolute_path, error);