Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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 use sudo on its first start .

share|improve this question
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
thank you, will try that one :) –  mit Dec 30 '10 at 20:56
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.