[Pythonmac-SIG] Silly MacOS X question...

Dan Grassi dan@biznesshosting.com
Mon, 3 Dec 2001 23:03:24 -0500


On Monday, December 3, 2001, at 07:41 PM, tracy shaun ruggles wrote:

> Hi,
>
> Just installed MacOS X and trying to change file permissions within the
> folder where Apache CGI files are, *but* my own machine won't let me 
> (that
> folder is owned by 'root').
>
> How does one change files that are owned by root?

Yoy have to provide a password for root, it comes blank.  The easiest 
way to do this is:
sudo passwd
and answer the prompts.  I always use my password.
The other way is to copy your password and past it into root's password 
in NetInfo Manager.

Beware, do _not_ do thinks as root unless you have to, and then use sudo 
unless it is really inconvenient.  Doing thinks as root is a big nubie 
concept and it will cause many problems.

> ... how does one
> install things like Webware and MySQL on MacOS X so that it is run as 
> root
> and/or is accessible by all users of the machine?

Get MySQL from http://www.entropy.ch/software/macosx/mysql/
Follow the installation instructions.  Probably a larger problem is 
getting the binary for the python MySQL driver, I had to compile it from 
source and there are compile problems under OS 10.1.  If you need this 
let me know and I will post it on the net.  I also understand that the 
compile problem has been resolved in python 2.2b2.  As for webware ask 
Chuck. :-)

> And, one more X-novice question: where/what is the file that specifies 
> where
> to run applications from the terminal, i.e. "python thisScript.py" 
> execute
> the script using python.

I'm not sure I understand the question but I think the answer is the 
$PATH environment variable.  Just type
$PATH
in the terminal application  to see the search directories.  You can 
modify this interactively of in the .cshrc file in your home directory.

> Or, better yet, "./thisScript.py" where the first line would read 
> something
> like "#!/usr/local/bin/python".

Again I don't fully understand the question.  First, if you are running 
the command line python it will be in /usr/bin with the rest of python 
in /usr/lib/python2.1  If your python is in /usr/local/bin you probably 
have the GUI version and that is probably not the version you want to 
use with webware. [Jack?]  I have a link in /usr/local/python to 
/usr/bin/python because there are some programs that assume that python 
is in /usr/local/bin.  MySQL does the same thing, placing many links in 
/usr/local/bin to the real files in /usr/bin.

> I can't access most of the folders in /usr since I'm not 'root'.

First enter a password for root.  In the GUI under the Go menu select Go 
to Folder and enter the folder name.  Note, you can _not_ enter /usr but 
/usr/local works as do similar /usr directories, other directories do 
not have this peculiarity, /etc works.  Then there is the terminal, if 
you are going to fiddle with the under laying unix get used to it.

Dan