Under some conditions, the directory for Habana log files can be created by the root, without the user permissions to modify this directory.
(For example, if the user executes sudo hl-smi for the first time, or if some packages were installed under sudo, etc.)
$HOME/.habana_logs is the default location, used by all Habana tools to store log files. This location will be used if the environment variable HABANA_LOGS is not set up, or is set up but points to this location.
In such situation, various commands can fail with “permission denied” message (see picture for an example)
There are several ways to avoid this situation:
- Set up environment variable HABANA_LOGS to some other location.
- Sudo chmod 777 $HOME/.habana_logs; Sudo chmod 777 $HOME/.habana_logs/*
- Sudo chown $USER:$USER $HOME/.habana_logs; Sudo chgrp $USER:$USER $HOME/.habana_logs