Can't Edit Hosts File As SUDO?

bob's Avatar

bob

23 Mar, 2013 11:48 AM

I'm trying to edit my hosts file and Path Finder's text editor won't let me save changes, complaining that I don't have the right permissions. I thought Path Finder launched as root? Not so?

How to I grant Path Finder super user privileges so that I can edit system files?

Bob

  1. 1 Posted by bob on 10 Apr, 2013 04:47 PM

    bob's Avatar

    Cocoatech wrote:
    > Hi Bob Rockefeller,
    >
    > We have received your inquiry and will do our best to respond soon. We're currently under an extremely heavy load, so responses will take longer than normal.
    >
    >
    > Thanks for your patience!
    >
    > This is an automated response from the Cocoatech Team.
    >
    This is a very old request. Any progress?

    Bob
    ------------------------------------------------------------------------
    Bob Rockefeller
    "I'm growing older, but not up!"
    Richmond Hill, GA

  2. 2 Posted by Damazio on 10 Apr, 2013 06:27 PM

    Damazio's Avatar

    Path Finder can launch apps as root (in the Commands menu, I think). Maybe you can launch a second instance of Path Finder as root, from within Path Finder but I use a dedicated coder's editor for such tasks.

  3. 3 Posted by bob on 11 Apr, 2013 11:14 AM

    bob's Avatar

    Damazio wrote:
    > Path Finder can launch apps as root (in the **Commands** menu, I think). Maybe you can launch a second instance of Path Finder as root, from within Path Finder but I use a dedicated coder's editor for such tasks.
    OK, so Path Finder cannot do this with it's own internal text editor? Dang!

    Bob
    ------------------------------------------------------------------------
    Bob Rockefeller
    "I'm growing older, but not up!"
    Richmond Hill, GA

  4. 4 Posted by Damazio on 11 Apr, 2013 12:49 PM

    Damazio's Avatar

    I notified Dragan (dev) about this discussion, Bob.

  5. Support Staff 5 Posted by Dragan on 12 Apr, 2013 11:21 AM

    Dragan's Avatar

    Perhaps I don't understand what you're trying to do, but this should not be the problem. Which version are you using?

    There are two different scenarios: the first one is when you want to save a file before closing it. Path Finder should ask you for admin user name and password to save the file (actually, to run the authopen tool, which will do that). Please see attached image save.png.

    The second scenario is that you try to close the file without previously saving it. In that case, everything is taken care of by the OS X (Cocoa) document saving mechanism. You're firstly asked if you want to save the file (see attached image close_1.png) and if you choose to do so, you're informed you don't have rights to do that, but you're still offered to save it anyway (see attached image close_2.png). If you choose to, the system will disregard your current permissions and save the file.

    Can you explain a bit more what's really happening on your side and attach a screenshot of what exactly are you getting when Path Finder "complains that I don't have the right permissions"?

  6. 6 Posted by bob on 12 Apr, 2013 05:16 PM

    bob's Avatar

    > Dragan
    > <mailto:[email blocked]>
    > April 12, 2013 7:21 AM
    > From: Dragan (Cocoatech Support)
    > Subject: Can't Edit Hosts File As SUDO?
    >
    > Perhaps I don't understand what you're trying to do, but this should
    > not be the problem. Which version are you using?
    >
    > There are two different scenarios: the first one is when you want to
    > save a file before closing it. Path Finder should ask you for admin
    > user name and password to save the file (actually, to run the authopen
    > tool, which will do that). Please see attached image **save.png**.
    >
    > The second scenario is that you try to close the file without
    > previously saving it. In that case, everything is taken care of by the
    > OS X (Cocoa) document saving mechanism. You're firstly asked if you
    > want to save the file (see attached image **close_1.png**) and if you
    > choose to do so, you're informed you don't have rights to do that, but
    > you're still offered to save it anyway (see attached image
    > **close_2.png**). If you choose to, the system will disregard your
    > current permissions and save the file.
    >
    > Can you explain a bit more what's really happening on your side and
    > attach a screenshot of what exactly are you getting when Path Finder
    > "complains that I don't have the right permissions"?
    >
    >
    >
    > Attachments for this comment:
    > - save.png
    > http://support.cocoatech.com/discussions/problems/12217/assets/df22b98d09750e1a38253c5f0ecfdd0aab9e76ce/save.png
    >
    > - close_1.png
    > http://support.cocoatech.com/discussions/problems/12217/assets/ed6f32b4be4e50d82ab3888b3582b3c5acad6990/close_1.png
    >
    > - close_2.png
    > http://support.cocoatech.com/discussions/problems/12217/assets/4fde6c293fd6a54a71603b5395ef7df39aa4fdd6/close_2.png
    >
    >
    > View this discussion at our support site online:
    > http://support.cocoatech.com/discussions/problems/12217-cant-edit-hosts-file-as-sudo
    > Reply with #ignore to stop receiving notifications for this discussion.
    >
    > ------------------------------------------------------------------------
    Thank you for checking back with me.

    I've made an update (or maybe two) to Path Finder and am now running
    v6.1.5. I can't replicate the problem, so either one of the updates
    helped, or I was doing something wrong. I can edit system files now and
    I do get the authorization dialog when I attempt to save one.

    Bob
    ------------------------------------------------------------------------
    Bob Rockefeller
    "I'm growing older, but not up!"
    Richmond Hill, GA

  7. Support Staff 7 Posted by Dragan on 12 Apr, 2013 05:51 PM

    Dragan's Avatar

    OK, I'll close this one.

  8. Dragan closed this discussion on 12 Apr, 2013 05:51 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac