Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#53451 closed defect (fixed)

mc installs as root with root-only permissions under Sierra. So when mc runs as user, it can't save anything

Reported by: fyngyrz (Ben) Owned by: mkae (Marko Käning)
Priority: Normal Milestone:
Component: ports Version: 2.3.5
Keywords: Cc:
Port: mc

Description (last modified by mkae (Marko Käning))

Basically, all installed config files and directories are created rw(x)------ and so you can only save anything about a mc or mcedit operation when "sudo mc". The install does set things up in the user folder, but the permissions are wrong.

This is compounded by mc claiming it is saving things in ~/.config/mc, when it is actually trying to save to ~/.local/share/mc

Made it pretty hard to find out WTF was going on.

Folders should be created with the username with rwx------ or with root rwxrwxrwx

Config files should be created with the username with rw---------- or with root rw-rw-rw-

--fyngyrz

Change History (15)

comment:1 Changed 8 years ago by fyngyrz (Ben)

1st line s/b: "can only save", sorry

comment:2 Changed 8 years ago by mf2k (Frank Schima)

Owner: set to mkae
Status: newassigned

In the future, please Cc the port maintainers (port info --maintainers mc), if any.

comment:3 in reply to:  1 Changed 8 years ago by mkae (Marko Käning)

Description: modified (diff)

Replying to fyngyrz:

1st line s/b: "can only save", sorry

I fixed that for you.

comment:4 Changed 8 years ago by mkae (Marko Käning)

This is what I see on a Sierra VM of mine:

marko$ ls -la .config/mc/
insgesamt 4
drwx------ 4 marko staff  136 Sep 21  2014 .
drwx------ 3 marko staff  102 Sep 21  2014 ..
-rw-r--r-- 1 marko staff 3141 Sep 21  2014 ini
-rw-r--r-- 1 marko staff    0 Sep 21  2014 panels.ini

This means, I can't reproduce both of your findings.

Perhaps you might want to try chown or rm the folders in question?

comment:5 Changed 8 years ago by fyngyrz (Ben)

Oh, I have the install fixed now - I went in via sudo and changed everything. I installed macports using sudo, according to the instructions, but I don't use the machine that way, of course.

it was very straightforward. I installed macports; then I installed mc. No other complications.

Last edited 8 years ago by fyngyrz (Ben) (previous) (diff)

comment:6 Changed 8 years ago by mkae (Marko Käning)

Resolution: fixed
Status: assignedclosed

Still, I am puzzled, as I have no idea how you ended up with root-owned folders in your user directory. Happy to hear that it is fixed now.

comment:7 Changed 8 years ago by fyngyrz (Ben)

well, when you are sudo, you are root. Since macports insists on a sudo install... that's what you get.

comment:8 Changed 8 years ago by fyngyrz (Ben)

okay, I see you have closed this. nm then.

comment:9 Changed 8 years ago by mkae (Marko Käning)

(Ooops, I though I had submitted this comment earlier, but it was still dangling in the comment editor unsent:)

OK, you ran mc as root in your user's home dir which left mc thinking that it should place its files in the user's home dir. So the root shell wasn't a login shell then...

comment:10 Changed 8 years ago by fyngyrz (Ben)

I did this, (handwaving the command line details, but this, in this order:)

sudo install macports.
sudo port install mc.
mc

Which, IIRC, was what the instructions said to do. Yes? ...so mc was running as me - not root. But had been installed as root, because sudo

Last edited 8 years ago by fyngyrz (Ben) (previous) (diff)

comment:11 Changed 8 years ago by mkae (Marko Käning)

That is very odd. Shouldn't happen like that.

Can you reproduce that?

comment:12 Changed 8 years ago by fyngyrz (Ben)

well, I can't now, I'm all installed and set up

But I assure you, that's what happened. :)

Last edited 8 years ago by fyngyrz (Ben) (previous) (diff)

comment:13 Changed 8 years ago by mkae (Marko Käning)

You could uninstall and reinstall! ;)

comment:14 Changed 8 years ago by fyngyrz (Ben)

was a new install of Sierra. very 1st thing I did was install macports and mc. Can't live w/o mc

comment:15 Changed 8 years ago by fyngyrz (Ben)

well, I could, but I'm way downstream from all that now, with other stuff installed, apps installed, etc. In my case, it's not broken, so... not inclined to break it. If you can't reproduce, that's ok, if it comes up again you'll know about it. I appreciate your time.

Note: See TracTickets for help on using tickets.