Resolving the error when starting the MC “Unable to create directory” /home/user/.local/share/mc “”

I noticed once the following error when starting MC (Midnight Commander):

Unable to create directory “/home/user/.local/share/mc”

The cause of the error is most likely that as soon as the MC was installed, it was immediately launched through sudo and in the user folder, the directories /.cache/, /.local/, and /.config/ were created from the root user, respectively, other users did not will get access to them, including the user himself.

To solve this problem, specify the correct owner and group in these directories:

sudo chown -Rf user:user /home/user/.cache/
sudo chown -Rf user:user /home/user/.local/
sudo chown -Rf user:user /home/user/.config/

Now Midnight Commander should start.

Leave a comment

Leave a Reply