Group owner, MAC OS X executables?

Discussion in 'Computer Support' started by Charles Sullivan, Nov 10, 2006.

  1. A Linux program installs its executable with both the
    owner and group set to 'root'. A port of this program
    to Mac OS X fails because (as I understand it) Mac
    OS X does not have a group named 'root'.

    What group would normally be used for 3rd-party
    executables under Mac OS X? (Presumably this will be
    valid for all versions of OS X.)

    Thanks for your help.

    Regards,
    Charles Sullivan
    Charles Sullivan, Nov 10, 2006
    #1
    1. Advertising

  2. On Fri, 10 Nov 2006 20:56:15 +0000, Charles Sullivan wrote:

    > A Linux program installs its executable with both the
    > owner and group set to 'root'. A port of this program
    > to Mac OS X fails because (as I understand it) Mac
    > OS X does not have a group named 'root'.
    >
    > What group would normally be used for 3rd-party
    > executables under Mac OS X? (Presumably this will be
    > valid for all versions of OS X.)
    >


    Hm. Does your Mac Linux have a command line prompt? One should hope it
    does. :) If so, get into same and ...

    1. type
    su -

    2. You should be prompted for the root or adminisrator password. If you
    didn't enter one when you installed Linux on the machine,, you could be in
    trouble. If all else fails, try your regular password.

    3. Let's assume your password worked. You will then have a # prompt rather
    than a $ prompt. Type

    updatedb

    and press Enter. That will take a while. Once the database is built, type

    locate <programname> and press Enter again. You may get a bunch of stuff
    including the program's files; you are looking for the executable, which
    will be named whatever it is that you use to run the program.

    4. So you've found where the executable is? Good. Now type

    cd <placewheretheexecutableis>, using the full path starting with the /.

    5. Now that you're wherever the executable is, type

    ls -la

    to see if the executable is in fact there. You can tell that by looking at
    the beginning of the line listing it. If the pattern there looks something
    like

    -rwxr-xr-x --with x's in the places indicated--you are looking at an
    executable file and it's probably the one you want. Now,

    6. Type

    chown yourusername:yourusername <filename> to change the group and user
    ownership to you. If for some reason you need to have everything in the
    directory changed to you, get into the directory just "above" the one in
    which the program files reside--in other words, by doing <ls> you can see
    the directory--and type

    chown -R <yourusername:yourgroupname> <nameofdirectory>/*

    and press Enter. The -R option causes chown to recursively traverse the
    entire directory and its subdirectories.

    I know this doesn't answer your original question, but at least it'll get
    you to the point where the files don't belong to root anymore. :)

    --
    Gary G. Taylor * Pomona, CA * 34.074630N 117.754195W
    knotgary at knotdonavan dot org http : // www.donavan.org
    "The two most abundant substance in the Universe are hydrogen
    and stupidity." --Frank Zappa, R.A.Heinlein and many others
    Gary G. Taylor, Nov 11, 2006
    #2
    1. Advertising

  3. On Sat, 11 Nov 2006 06:32:08 +0000, Gary G. Taylor wrote:

    > On Fri, 10 Nov 2006 20:56:15 +0000, Charles Sullivan wrote:
    >
    >> A Linux program installs its executable with both the
    >> owner and group set to 'root'. A port of this program
    >> to Mac OS X fails because (as I understand it) Mac
    >> OS X does not have a group named 'root'.
    >>
    >> What group would normally be used for 3rd-party
    >> executables under Mac OS X? (Presumably this will be
    >> valid for all versions of OS X.)
    >>

    >
    > Hm. Does your Mac Linux have a command line prompt? One should hope it
    > does. :) If so, get into same and ...


    <snip>

    > I know this doesn't answer your original question, but at least it'll get
    > you to the point where the files don't belong to root anymore. :)


    Gary,
    Thank you for your detailed response, however my question was
    misunderstood. I am trying to fix the port of a Linux program
    to Mac OS X so it will install correctly on a Mac OS X system.
    I want to know what group ownership to set for the program's
    executable with the installation script but I don't have access
    to a Mac OS X system to see what's normally used.

    Regards,
    Charles Sullivan
    Charles Sullivan, Nov 11, 2006
    #3
  4. On Sat, 11 Nov 2006 13:16:59 +0000, Charles Sullivan wrote:

    > Gary,
    > Thank you for your detailed response, however my question was
    > misunderstood. I am trying to fix the port of a Linux program
    > to Mac OS X so it will install correctly on a Mac OS X system.
    > I want to know what group ownership to set for the program's
    > executable with the installation script but I don't have access
    > to a Mac OS X system to see what's normally used.
    >
    > Regards,
    > Charles Sullivan


    Charles--
    Oh, okay. In that case, root:root should work, since that is what most
    program installers use. If you have it installed in a current Linux box,
    check there; it should be the same.

    --
    Gary G. Taylor * Pomona, CA * 34.074630N 117.754195W
    knotgary at knotdonavan dot org http : // www.donavan.org
    "The two most abundant substance in the Universe are hydrogen
    and stupidity." --Frank Zappa, R.A.Heinlein and many others
    Gary G. Taylor, Nov 12, 2006
    #4
  5. On Sun, 12 Nov 2006 07:23:06 +0000, Gary G. Taylor wrote:

    > On Sat, 11 Nov 2006 13:16:59 +0000, Charles Sullivan wrote:
    >
    >> Gary,
    >> Thank you for your detailed response, however my question was
    >> misunderstood. I am trying to fix the port of a Linux program
    >> to Mac OS X so it will install correctly on a Mac OS X system.
    >> I want to know what group ownership to set for the program's
    >> executable with the installation script but I don't have access
    >> to a Mac OS X system to see what's normally used.
    >>
    >> Regards,
    >> Charles Sullivan

    >
    > Charles--
    > Oh, okay. In that case, root:root should work, since that is what most
    > program installers use. If you have it installed in a current Linux box,
    > check there; it should be the same.


    Gary,
    Should, but doesn't. root:root was what the installation script
    had been using for Linux and was the problem - group 'root' does
    not exist in Mac OS X, so the installation failed at 'chgrp' (with
    a not particularly informative error message).

    I've since learned from OS X users that the usual owner:group for
    executables in OS X is 'root:wheel'.

    Regards,
    Charles Sullivan
    Charles Sullivan, Nov 12, 2006
    #5
  6. On Sun, 12 Nov 2006 13:14:21 +0000, Charles Sullivan wrote:

    > I've since learned from OS X users that the usual owner:group for
    > executables in OS X is 'root:wheel'.


    Charles,
    Thanks for that datum. I've never dealt with Mac OS (as you can probably
    tell), so this might be valuable to me some time in the future.

    My question is: Where does Mac OS leave off and Linux begin? Is it Linux
    or Mac OS or some combination of the two?

    --
    Gary G. Taylor * Pomona, CA * 34.074630N 117.754195W
    knotgary at knotdonavan dot org http : // www.donavan.org
    "The two most abundant substance in the Universe are hydrogen
    and stupidity." --Frank Zappa, R.A.Heinlein and many others
    Gary G. Taylor, Nov 12, 2006
    #6
  7. Charles Sullivan

    Whiskers Guest

    On 2006-11-12, Gary G. Taylor <> wrote:
    > On Sun, 12 Nov 2006 13:14:21 +0000, Charles Sullivan wrote:
    >
    >> I've since learned from OS X users that the usual owner:group for
    >> executables in OS X is 'root:wheel'.

    >
    > Charles,
    > Thanks for that datum. I've never dealt with Mac OS (as you can probably
    > tell), so this might be valuable to me some time in the future.
    >
    > My question is: Where does Mac OS leave off and Linux begin? Is it Linux
    > or Mac OS or some combination of the two?


    There is no "Linux" in Mac OS X. What there is, is a very basic "Unix"
    system underlying the Apple Mac stuff. That means, as a side-effect, that
    many programs written for Unix or Linux text-only systems, can be
    'compiled' to run on a Mac OS X machine. I've heard that you can even get
    "X" running, which is the basis for most of the 'window managers' and
    'desktop environments' used on Unix and Linux personal computers, so even
    graphical programs meant for *n*x will function - more or less.

    You can also install a complete Linux 'distro' on an Apple machine (both
    the old Power PC type, and the current Intel-based ones), either alongside
    or instead of the original Apple Mac system. You can even install Windows
    XP on an Intel-based Apple computer, if you really really want to.

    --
    -- ^^^^^^^^^^
    -- Whiskers
    -- ~~~~~~~~~~
    Whiskers, Nov 12, 2006
    #7
  8. Charles Sullivan

    Ponder Guest

    Hiya Gary G. Taylor.

    In <news:hZH5h.228$5F2.204@trnddc04> you wrote:

    > My question is: Where does Mac OS leave off and Linux begin? Is it Linux
    > or Mac OS or some combination of the two?


    Mac OS X is not Linux, though the underlying Darwin is very similar. I
    did manage to compile a few apps from source when I was asked to reinstall
    a Mac a while back. He had neglected to bring his OS X DVD so I had a play
    with Darwin for the few days it was here awaiting that ;)

    --
    PGP key ID - DSS:0x2661A952
    Ponder - Homepage: http://www.colinjones.co.uk ICQ# 1707811
    Skittles Team: http://www.ddskittles.co.uk
    Ponder, Nov 12, 2006
    #8
  9. Charles Sullivan

    keme Guest

    Charles Sullivan skrev:
    > On Sun, 12 Nov 2006 07:23:06 +0000, Gary G. Taylor wrote:
    >
    >> On Sat, 11 Nov 2006 13:16:59 +0000, Charles Sullivan wrote:
    >>
    >>> Gary,
    >>> Thank you for your detailed response, however my question was
    >>> misunderstood. I am trying to fix the port of a Linux program
    >>> to Mac OS X so it will install correctly on a Mac OS X system.
    >>> I want to know what group ownership to set for the program's
    >>> executable with the installation script but I don't have access
    >>> to a Mac OS X system to see what's normally used.
    >>>
    >>> Regards,
    >>> Charles Sullivan

    >> Charles--
    >> Oh, okay. In that case, root:root should work, since that is what most
    >> program installers use. If you have it installed in a current Linux box,
    >> check there; it should be the same.

    >
    > Gary,
    > Should, but doesn't. root:root was what the installation script
    > had been using for Linux and was the problem - group 'root' does
    > not exist in Mac OS X, so the installation failed at 'chgrp' (with
    > a not particularly informative error message).
    >
    > I've since learned from OS X users that the usual owner:group for
    > executables in OS X is 'root:wheel'.
    >
    > Regards,
    > Charles Sullivan
    >
    >
    >
    >


    You got that right. OS-X is based on BSD, which, though looking similar
    to linux, has an entirely different codebase. The wheel group in xBSD
    has the same role (AFAIK) that the root group has in linux. So if you
    get your program working in OS-X (command line shell or using X11), it
    should work in FreeBSD too, and possibly in NetBSD and OpenBSD as well.
    keme, Nov 12, 2006
    #9
  10. On Sun, 12 Nov 2006 16:29:01 +0000, Gary G. Taylor wrote:

    > On Sun, 12 Nov 2006 13:14:21 +0000, Charles Sullivan wrote:
    >
    >> I've since learned from OS X users that the usual owner:group for
    >> executables in OS X is 'root:wheel'.

    >
    > Charles,
    > Thanks for that datum. I've never dealt with Mac OS (as you can probably
    > tell), so this might be valuable to me some time in the future.
    >
    > My question is: Where does Mac OS leave off and Linux begin? Is it Linux
    > or Mac OS or some combination of the two?


    As far as the OS itself is concerned, the other folks who responded have
    it correct - Mac OS X is derived from BSD Unix and Linux is, well, Linux. :)

    As far as my program is concerned it was written and is maintained in
    Linux. But over the years various users have supplied patches for a
    number of other Unix-like operating systems and these were incorporated
    into the code base. Unfortunately when I make changes or enhancements to
    the program in Linux I sometimes screw something up on the other OSes,
    as in this case when I assumed that root:root was valid for everybody.

    Regards,
    Charles Sullivan
    Charles Sullivan, Nov 13, 2006
    #10
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. default
    Replies:
    5
    Views:
    457
    Yandos
    Nov 11, 2005
  2. Norm

    Unknown Executables

    Norm, Feb 1, 2004, in forum: Computer Support
    Replies:
    6
    Views:
    374
    °Mike°
    Feb 1, 2004
  3. Replies:
    1
    Views:
    537
    David H. Lipman
    Feb 27, 2007
  4. Tester

    XP ignores file extensions on executables?

    Tester, Feb 3, 2007, in forum: Computer Support
    Replies:
    1
    Views:
    385
  5. =?Utf-8?B?MzItYml0IGV4ZWN1dGFibGVzIGNvbXBhdGliaWxp

    32-bit executables

    =?Utf-8?B?MzItYml0IGV4ZWN1dGFibGVzIGNvbXBhdGliaWxp, Jan 17, 2006, in forum: Windows 64bit
    Replies:
    2
    Views:
    326
    Charlie Russel - MVP
    Jan 17, 2006
Loading...

Share This Page