MCPcopy Create free account
hub / github.com/ClickHouse/ClickHouse / changeOwnership

Function changeOwnership

programs/install/Install.cpp:139–148  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

137}
138
139static void changeOwnership(const String & file_name, const String & user_name, const String & group_name = {}, bool recursive = true)
140{
141 if (!user_name.empty() || !group_name.empty())
142 {
143 std::string command = fmt::format("chown {} {}:{} {}",
144 (recursive ? "-R" : ""), shellQuote(user_name), shellQuote(group_name), shellQuote(file_name));
145 fmt::print(" {}\n", command);
146 executeScript(command);
147 }
148}
149
150static void createGroup(const String & group_name)
151{

Callers 2

Install.cppFile · 0.85
startFunction · 0.85

Calls 5

shellQuoteFunction · 0.85
executeScriptFunction · 0.85
formatFunction · 0.50
printFunction · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected