Reading here boost filesystem. The value of 509 does not exist.
The code that is doing this is:
boost::filesystem::path closest_existing_path = log_dir;
do {
closest_existing_path = log_dir.parent_path();
} while (!boost::filesystem::exists(closest_existing_path) &&
closest_existing_path != boost::filesystem::path(""));
std::cout << "Closest existing path --" << closest_existing_path <<
"-- permissions = " <<
boost::filesystem::status(closest_existing_path).permissions() <<
std::endl;
The directory being passed in for sure exists.
The sample output is:
./logger_tester && cat results.txt
Closest existing path
--"/usr"-- permissions = 493
Closest existing path
--"/home/mehoggan/Devel/RuleSimulator/src/utils/util_tests"-- permissions = 509