diff --git a/selfdrive/common/params.cc b/selfdrive/common/params.cc index 2abfca11dd..a44933402e 100644 --- a/selfdrive/common/params.cc +++ b/selfdrive/common/params.cc @@ -167,6 +167,12 @@ int Params::write_db_value(const char* key, const char* value, size_t value_size if (result < 0) { goto cleanup; } + } else { + // Ensure permissions are correct in case we didn't create the symlink + result = chmod(path.c_str(), 0777); + if (result < 0) { + goto cleanup; + } } // Write value to temp. diff --git a/selfdrive/common/params.h b/selfdrive/common/params.h index 926c2c0798..d8c96a8cb2 100644 --- a/selfdrive/common/params.h +++ b/selfdrive/common/params.h @@ -7,10 +7,10 @@ #define ERR_NO_VALUE -33 class Params { - private: +private: std::string params_path; - public: +public: Params(bool persistent_param = false); Params(std::string path);