```
$ ls -lR

.:
total 1645932
-rwxrwxr-x 1 milovidov milovidov 1685419984 июл  4 00:33 clickhouse
drwxrwxr-x 2 milovidov milovidov       4096 июл  4 00:36 lib
drwxrwxr-x 2 milovidov milovidov       4096 июл  4 00:36 lib64

./lib:
total 3536
-rwxr-xr-x 1 milovidov milovidov 2025032 июл  4 00:36 libc.so.6
-rw-r--r-- 1 milovidov milovidov   18816 июл  4 00:36 libdl.so.2
-rw-r--r-- 1 milovidov milovidov 1369352 июл  4 00:36 libm.so.6
-rwxr-xr-x 1 milovidov milovidov  158288 июл  4 00:36 libpthread.so.0
-rw-r--r-- 1 milovidov milovidov   40040 июл  4 00:36 librt.so.1

./lib64:
total 184
-rwxr-xr-x 1 milovidov milovidov 187376 июл  4 00:36 ld-linux-x86-64.so.2


$ sudo chroot . /clickhouse local --query "SELECT 1"
filesystem error: in temp_directory_path: path "/tmp" is not a directory: Not a directory
```
{
    std::lock_guard lock(shared->storage_policies_mutex);
    if (policy_name.empty())
    {
        shared->tmp_path = path;
        if (!shared->tmp_path.ends_with('/'))
            shared->tmp_path += '/';
        auto disk = std::make_shared<DiskLocal>("_tmp_default", shared->tmp_path, 0);
        shared->tmp_volume = std::make_shared<SingleDiskVolume>("_tmp_default", disk, 0);
    }
    else
    {
        StoragePolicyPtr tmp_policy = getStoragePolicySelector(lock)->get(policy_name);
        if (tmp_policy->getVolumes().size() != 1)
             throw Exception("Policy " + policy_name + " is used temporary files, such policy should have exactly one volume", ErrorCodes::NO_ELEMENTS_IN_CONFIG);
        shared->tmp_volume = tmp_policy->getVolume(0);
    }
    if (shared->tmp_volume->getDisks().empty())
         throw Exception("No disks volume for temporary files", ErrorCodes::NO_ELEMENTS_IN_CONFIG);
    return shared->tmp_volume;
}
void Context::setFlagsPath(const String & path)