```
$ 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
```
{
    auto lock = getLock();
    if (user_id)
        access = getAccessControlManager().getContextAccess(*user_id, current_roles, use_default_roles, settings, current_database, client_info);
}
template <typename... Args>
void Context::checkAccessImpl(const Args &... args) const
{
    return getAccess()->checkAccess(args...);
}
void Context::checkAccess(const AccessFlags & flags) const { return checkAccessImpl(flags); }
void Context::checkAccess(const AccessFlags & flags, const std::string_view & database) const { return checkAccessImpl(flags, database); }
void Context::checkAccess(const AccessFlags & flags, const std::string_view & database, const std::string_view & table) const { return checkAccessImpl(flags, database, table); }
void Context::checkAccess(const AccessFlags & flags, const std::string_view & database, const std::string_view & table, const std::string_view & column) const { return checkAccessImpl(flags, database, table, column); }
void Context::checkAccess(const AccessFlags & flags, const std::string_view & database, const std::string_view & table, const std::vector<std::string_view> & columns) const { return checkAccessImpl(flags, database, table, columns); }
void Context::checkAccess(const AccessFlags & flags, const std::string_view & database, const std::string_view & table, const Strings & columns) const { return checkAccessImpl(flags, database, table, columns); }
void Context::checkAccess(const AccessFlags & flags, const StorageID & table_id) const { checkAccessImpl(flags, table_id.getDatabaseName(), table_id.getTableName()); }
void Context::checkAccess(const AccessFlags & flags, const StorageID & table_id, const std::string_view & column) const { checkAccessImpl(flags, table_id.getDatabaseName(), table_id.getTableName(), column); }
void Context::checkAccess(const AccessFlags & flags, const StorageID & table_id, const std::vector<std::string_view> & columns) const { checkAccessImpl(flags, table_id.getDatabaseName(), table_id.getTableName(), columns); }
void Context::checkAccess(const AccessFlags & flags, const StorageID & table_id, const Strings & columns) const { checkAccessImpl(flags, table_id.getDatabaseName(), table_id.getTableName(), columns); }
void Context::checkAccess(const AccessRightsElement & element) const { return checkAccessImpl(element); }
void Context::checkAccess(const AccessRightsElements & elements) const { return checkAccessImpl(elements); }
std::shared_ptr<const ContextAccess> Context::getAccess() const
{
    auto lock = getLock();
    return access ? access : ContextAccess::getFullAccess();
}
ASTPtr Context::getRowPolicyCondition(const String & database, const String & table_name, RowPolicy::ConditionType type) const