From 1f4c00c7b5ab91575e784c46844d3748ddb3d07a Mon Sep 17 00:00:00 2001 From: Joseph Henry Date: Tue, 5 Mar 2024 00:14:56 -0800 Subject: [PATCH] Improve CLI error message for write permission failures --- service/OneService.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/service/OneService.cpp b/service/OneService.cpp index 8fee13648..dbf5d497e 100644 --- a/service/OneService.cpp +++ b/service/OneService.cpp @@ -977,7 +977,7 @@ public: if (!OSUtils::writeFile(authTokenPath.c_str(),_authToken)) { Mutex::Lock _l(_termReason_m); _termReason = ONE_UNRECOVERABLE_ERROR; - _fatalErrorMessage = "authtoken.secret could not be written"; + _fatalErrorMessage = "authtoken.secret could not be written (try running with -U to prevent dropping of privileges)"; return _termReason; } else { OSUtils::lockDownFile(authTokenPath.c_str(),false); @@ -997,7 +997,7 @@ public: if (!OSUtils::writeFile(metricsTokenPath.c_str(),_metricsToken)) { Mutex::Lock _l(_termReason_m); _termReason = ONE_UNRECOVERABLE_ERROR; - _fatalErrorMessage = "metricstoken.secret could not be written"; + _fatalErrorMessage = "metricstoken.secret could not be written (try running with -U to prevent dropping of privileges)"; return _termReason; } else { OSUtils::lockDownFile(metricsTokenPath.c_str(),false);