Fixed config.json file permissions (#1191)

This commit is contained in:
Russel Waters 2018-09-19 10:08:22 -04:00 committed by Roy Keene
commit c7a262e1db
2 changed files with 2 additions and 0 deletions

View file

@ -102,6 +102,7 @@ void rai_daemon::daemon::run (boost::filesystem::path const & data_path)
std::fstream config_file;
std::unique_ptr<rai::thread_runner> runner;
auto error (rai::fetch_object (config, config_path, config_file));
boost::filesystem::permissions (config_path, boost::filesystem::owner_read | boost::filesystem::owner_write);
if (!error)
{
config.node.logging.init (data_path);

View file

@ -204,6 +204,7 @@ int run_wallet (QApplication & application, int argc, char * const * argv, boost
std::fstream config_file;
auto error (rai::fetch_object (config, config_path, config_file));
config_file.close ();
boost::filesystem::permissions (config_path, boost::filesystem::owner_read | boost::filesystem::owner_write);
if (!error)
{
boost::asio::io_service service;