Wrong permissions after sudo midnight commander
5,041
You could change the permissions on your ~/.mc
file like this:
chmod 664 ~/.mc
Make sure you do this as a regular user. This will set the permissions for the file to read and write for the owner (which should be your user) and root. And read only for anyone else.
Related videos on Youtube
Author by
mit
Updated on September 18, 2022Comments
-
mit over 1 year
I sometimes start Midnight Commander as superuser with the command
sudo mc
to do some operations on the current working directory as superuser.But this results in
~/.mc
having the wrong permissions, which I need to fix manually.Any solution?
Edit:
I accepted an answer. I want to further add, that
.mc
is a directory, so my solution goes like this:$ cd ~ ~$ sudo chown -R mit.mit .mc ~$ chmod 775 .mc ~$ cd .mc ~$ chmod -R 664 .mc ~/.mc$ chmod 775 cedit
It seems not to be a good idea after installing
mc
to usesudo
on its first start.-
SK23 over 7 yearsYou should post your solution as an answer and accept it instead of the incomplete one.
-