The exception msg thrown by checkBlockLocalPathAccess is very specific to the implementation detail. It's really hard for users to understand it unless she reads and understands the code.
The code is shown as follows:
(basically she needs to understand the code logic of getBlockLocalPathInfo)
Note that usersWithLocalPathAccess is a private final purely coming from the configuration settings of dfs.block.local-path-access.user,
In other word, the checking fails simply because the current user is not specified in the configuration setting of dfs.block.local-path-access.user. The log message should be much more clearer to make it easy for users to take actions, as demonstrated in the attached patch.