CGI and Root....


echo $row['what_tha'];
Two things ?

root , after installing X, I can't seem to su ? Where do I supply the root password or is the username used when first installing treated as root, because the only password I gave does not work when trying to su?

CGI, When tyring to test the cgi scripts in the CGI-Executables directory I get "Forbidden You don't have permission to access /cgi-bin/printenv on this server." So how do I give permission there ?

I tried "chmod o+x printenv" but got operation not permitted, maybe because I cant su?

Thanks a-head for any help?


there are a number of ways to enable root; a search on these forums would probably find about 15,000 posts with the answer. i'd tell you the command line version, but i don't remember it. i think there's an 'enable root' in netinfo manager, too, or you can reboot off the cd and pick 'reset password' menu item which also has an enable root choice.

however, to do what you want does not require a root account activated (which is something of a security issue). just "sudo" and then the command you want to do; in this case "chmod 755 printenv". this will run the command as root:

sudo chmod 755 /Library/WebServer/CGI-Executables/printenv

you'll be asked for your password when you run it.