Hi folks,
Mac OS X 10.8.4 Mountain Lion, MacBook Pro....
I need enlightenment on how OS X is set up. I can't "su" at all. If I do "su" I am prompted for my password. I enter the same password that lets me "sudo" any command. I get the laconic message: "su: Sorry".
Normally, "sudo" lets me do anything I need to. For example, I can go into /opt and "touch" and "rm" files:
But I'm getting permissions errors like the following on every single file in the tar distribution file when trying to install the GNU gcc compiler in /opt.
The extract works just fine if I go to some "scratch" directory that I create under my home directory. So the problem is not the integrity of the .tar.gz file. So I'm wondering if there is something I don't understand about the way Mac OS X handles permissions, "su" "sudo" and related things....
I've never really "developed" on Mac OS X at the shell/OS/etc... level as I've done on SunOS, Solaris, HP-UX, Linux, etc. in the past.
A related question is: is /opt the right place to install "additional" software, for example, if I want to install GNU software and don't want it to conflict with OS X utilities...?
Mac OS X 10.8.4 Mountain Lion, MacBook Pro....
I need enlightenment on how OS X is set up. I can't "su" at all. If I do "su" I am prompted for my password. I enter the same password that lets me "sudo" any command. I get the laconic message: "su: Sorry".
Normally, "sudo" lets me do anything I need to. For example, I can go into /opt and "touch" and "rm" files:
Code:
$ pwd
/opt
$ ls -ld
drwxr-xr-x@ 9 root admin 306 Jul 31 22:40 .
$
$ sudo touch foo
Password:
$ ls -lF
-rw-r--r-- 1 root admin 0 Jul 31 23:43 foo
-rw-r--r--@ 1 root admin 111363626 Jul 31 22:38 gcc-4.8.1.tar.gz
drwxr-xr-x@ 46 root wheel 1564 Jul 31 21:10 guile-2.0.9/
-rw-r--r--@ 1 root admin 33198080 Jul 31 21:01 guile-2.0.9.tar
$ sudo rm foo
$ ls -lF
-rw-r--r--@ 1 root admin 111363626 Jul 31 22:38 gcc-4.8.1.tar.gz
drwxr-xr-x@ 46 root wheel 1564 Jul 31 21:10 guile-2.0.9/
-rw-r--r--@ 1 root admin 33198080 Jul 31 21:01 guile-2.0.9.tar
$
But I'm getting permissions errors like the following on every single file in the tar distribution file when trying to install the GNU gcc compiler in /opt.
Code:
$ sudo gunzip -c gcc-4.8.1.tar.gz | tar xvf -
...
x gcc-4.8.1/libjava/classpath/lib/java/awt/MenuContainer.class: Failed to create dir 'gcc-4.8.1'Can't create 'gcc-4.8.1/libjava/classpath/lib/java/aw^
...
The extract works just fine if I go to some "scratch" directory that I create under my home directory. So the problem is not the integrity of the .tar.gz file. So I'm wondering if there is something I don't understand about the way Mac OS X handles permissions, "su" "sudo" and related things....
I've never really "developed" on Mac OS X at the shell/OS/etc... level as I've done on SunOS, Solaris, HP-UX, Linux, etc. in the past.
A related question is: is /opt the right place to install "additional" software, for example, if I want to install GNU software and don't want it to conflict with OS X utilities...?
Last edited: